From a9e5ed9dcec325f02a611bd9defc8ed10c74f4fa Mon Sep 17 00:00:00 2001 From: nvuillam Date: Sun, 20 Oct 2024 12:53:50 +0200 Subject: [PATCH] permissions --- .github/workflows/deploy-ALPHA-flavors.yml | 5 ++--- .github/workflows/deploy-ALPHA.yml | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-ALPHA-flavors.yml b/.github/workflows/deploy-ALPHA-flavors.yml index 44683b91510..3f9dbb9e849 100644 --- a/.github/workflows/deploy-ALPHA-flavors.yml +++ b/.github/workflows/deploy-ALPHA-flavors.yml @@ -45,6 +45,7 @@ jobs: # Set the agent to run on runs-on: ${{ matrix.os }} permissions: + actions: write packages: write strategy: fail-fast: false @@ -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 @@ -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 # diff --git a/.github/workflows/deploy-ALPHA.yml b/.github/workflows/deploy-ALPHA.yml index 3980906b38f..40ffe44b136 100644 --- a/.github/workflows/deploy-ALPHA.yml +++ b/.github/workflows/deploy-ALPHA.yml @@ -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') @@ -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 @@ -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 @@ -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 }}