Skip to content

Commit

Permalink
Do not push to docker from dev PRs (#2639)
Browse files Browse the repository at this point in the history
* Do not push to docker from dev PRs

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: nvuillam <[email protected]>
  • Loading branch information
nvuillam and nvuillam authored May 14, 2023
1 parent c2f5741 commit e8e1e78
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/deploy-DEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
if: |
(
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'push' && github.repository == 'oxsecurity/megalinter')
)
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

###################################
# Build image locally for testing #
###################################
Expand All @@ -125,8 +114,8 @@ jobs:
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=${{ steps.image_tag.outputs.tag }}
MEGA_LINTER_BASE_IMAGE="oxsecurity/megalinter:beta"
load: false
push: true
load: true
push: false
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: |
Expand Down Expand Up @@ -182,8 +171,8 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=${{ steps.image_tag.outputs.tag }}
load: false
push: true
load: true
push: false
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: |
Expand Down

0 comments on commit e8e1e78

Please sign in to comment.