Skip to content

Commit

Permalink
permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Oct 20, 2024
1 parent bbd99d8 commit a9e5ed9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deploy-ALPHA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
# Set the agent to run on
runs-on: ${{ matrix.os }}
permissions:
actions: write
packages: write
strategy:
fail-fast: false
Expand Down Expand Up @@ -121,7 +122,6 @@ jobs:
with:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "ghcr.io/oxsecurity/megalinter-${{ matrix.flavor }}:alpha", "target-image": "docker.io/oxsecurity/megalinter-${{ matrix.flavor }}:alpha" }'
ref: ${{ github.ref_name }}

- name: Build Worker Image
uses: docker/build-push-action@v6
Expand All @@ -145,8 +145,7 @@ jobs:
uses: benc-uk/workflow-dispatch@v1
with:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "ghcr.io/oxsecurity/megalinter-worker-${{ matrix.flavor }}:alpha", "target-image": "docker.io/oxsecurity/megalinter-worker-${{ matrix.flavor }}:alpha" }'
ref: ${{ github.ref_name }}
inputs: '{ "source-image": "ghcr.io/oxsecurity/megalinter-worker-${{ matrix.flavor }}:alpha", "target-image": "docker.io/oxsecurity/megalinter-worker-${{ matrix.flavor }}:alpha" }'

##############################################
# Check Docker image security with Trivy #
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/deploy-ALPHA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
# Set the agent to run on
runs-on: ubuntu-latest
permissions:
actions: write
packages: write
# Only run this on the main repo
if: github.repository == 'oxsecurity/megalinter' && !contains(github.event.head_commit.message, 'skip deploy')
Expand Down Expand Up @@ -111,7 +112,6 @@ jobs:
with:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "ghcr.io/oxsecurity/megalinter-server:alpha", "target-image": "docker.io/oxsecurity/megalinter-server:alpha" }'
ref: ${{ github.ref_name }}

- name: Build & Push Docker Image
uses: docker/build-push-action@v6
Expand All @@ -136,7 +136,6 @@ jobs:
with:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "ghcr.io/oxsecurity/megalinter:alpha", "target-image": "docker.io/oxsecurity/megalinter:alpha" }'
ref: ${{ github.ref_name }}

- name: Build & Push Worker Docker Image
uses: docker/build-push-action@v6
Expand All @@ -161,4 +160,3 @@ jobs:
with:
workflow: mirror-docker-image.yml
inputs: '{ "source-image": "ghcr.io/oxsecurity/megalinter-worker:alpha", "target-image": "docker.io/oxsecurity/megalinter-worker:alpha" }'
ref: ${{ github.ref_name }}

0 comments on commit a9e5ed9

Please sign in to comment.