From a62882d243fd8a3cd7901f72b99beeb92cc4e629 Mon Sep 17 00:00:00 2001 From: Callum Tait <15716903+toast-gear@users.noreply.github.com> Date: Thu, 9 Jun 2022 02:25:56 +0100 Subject: [PATCH] ci: fix permisions (#1512) * ci: fix permisions * chore: change to trigger build * ci: add write permission to packages * ci: remove conditionals for docker logins * Update controllers/utils_test.go Co-authored-by: Yusuke Kuoka --- .github/actions/setup-docker-environment/action.yaml | 2 -- .github/workflows/publish-canary.yaml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-docker-environment/action.yaml b/.github/actions/setup-docker-environment/action.yaml index c68d6651..d2e1955c 100644 --- a/.github/actions/setup-docker-environment/action.yaml +++ b/.github/actions/setup-docker-environment/action.yaml @@ -37,7 +37,6 @@ runs: version: latest - name: Login to DockerHub - if: ${{ github.ref == 'master' && github.event.pull_request.merged == true }} uses: docker/login-action@v2 with: username: ${{ inputs.username }} @@ -45,7 +44,6 @@ runs: - name: Login to GitHub Container Registry uses: docker/login-action@v2 - if: ${{ github.ref == 'master' && github.event.pull_request.merged == true }} with: registry: ghcr.io username: ${{ inputs.ghcr_username }} diff --git a/.github/workflows/publish-canary.yaml b/.github/workflows/publish-canary.yaml index 0b08808f..8cf11e06 100644 --- a/.github/workflows/publish-canary.yaml +++ b/.github/workflows/publish-canary.yaml @@ -19,8 +19,10 @@ on: - 'LICENSE' - 'Makefile' +# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps permissions: contents: read + packages: write jobs: canary-build: