From 0211aa7894ae6dc9980733d848c0690cf2cf4c0f Mon Sep 17 00:00:00 2001 From: Freek Gruntjes Date: Wed, 1 Feb 2023 16:41:21 +0100 Subject: [PATCH] chore: Attempted to fix ghcr-cleaner to delete images that have just been build --- .github/workflows/delete.yaml | 2 +- deploy/setup.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/delete.yaml b/.github/workflows/delete.yaml index 69f0ef6..68dfb1e 100644 --- a/.github/workflows/delete.yaml +++ b/.github/workflows/delete.yaml @@ -42,7 +42,7 @@ jobs: google_workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} google_service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }} container_registry: ${{ secrets.GOOGLE_REGION }}-docker.pkg.dev - - uses: 'docker://europe-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner-cli' + - uses: docker://europe-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner-cli with: args: >- -repo=${{ secrets.GOOGLE_REGION }}-docker.pkg.dev/${{ secrets.GOOGLE_PROJECT_ID }}/docker/${{ inputs.environment }} diff --git a/deploy/setup.sh b/deploy/setup.sh index 6360c00..3ae35bb 100755 --- a/deploy/setup.sh +++ b/deploy/setup.sh @@ -100,6 +100,7 @@ gcloud iam service-accounts add-iam-policy-binding "${GOOGLE_SERVICE_ACCOUNT_EMA --member="principalSet://iam.googleapis.com/${IDENTITY_POOL_ID}/attribute.repository/${GITHUB_REPOSITORY}" GCLOUD_ROLES=( "roles/artifactregistry.repoAdmin" + "roles/storage.objectViewer" "roles/run.developer" "roles/iam.serviceAccountUser" )