diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bed875..753fc91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,11 +4,6 @@ on: release: types: [created] -env: - IMAGE_REGISTRY: gcr.io - IMAGE_NAME: gcr.io/crowdstrike-public/falcon-integration-gateway - DEPLOYER: gcr.io/crowdstrike-public/falcon-integration-gateway/deployer - permissions: # added using https://github.com/step-security/secure-repo contents: read @@ -54,15 +49,15 @@ jobs: uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: token_format: access_token - workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} - service_account: ${{ secrets.SERVICE_ACCOUNT }} + workload_identity_provider: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }} + service_account: ${{ vars.GCP_SERVICE_ACCOUNT }} access_token_lifetime: 600s - name: Login to gcr.io uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: - registry: ${{ env.IMAGE_REGISTRY }} - username: ${{ secrets.REGISTRY_LOGIN }} + registry: ${{ vars.IMAGE_REGISTRY }} + username: oauth2accesstoken password: ${{ steps.auth.outputs.access_token }} - name: Set up Docker Buildx @@ -72,13 +67,13 @@ jobs: id: meta uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 with: - images: ${{ env.IMAGE_NAME }} + images: ${{ vars.IMAGE_NAME }} tags: | # set latest tag for default branch type=raw,value=latest,enable={{is_default_branch}} type=match,pattern=\d.\d type=match,pattern=\d.\d.\d - annotations: ${{ secrets.SERVICE_ANNOTATION }} + annotations: ${{ vars.SERVICE_ANNOTATION }} - name: Build and push uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 @@ -106,15 +101,15 @@ jobs: uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: token_format: access_token - workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} - service_account: ${{ secrets.SERVICE_ACCOUNT }} + workload_identity_provider: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }} + service_account: ${{ vars.GCP_SERVICE_ACCOUNT }} access_token_lifetime: 600s - name: Login to gcr.io uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: - registry: ${{ env.IMAGE_REGISTRY }} - username: ${{ secrets.REGISTRY_LOGIN }} + registry: ${{ vars.IMAGE_REGISTRY }} + username: oauth2accesstoken password: ${{ steps.auth.outputs.access_token }} - name: Set up Docker Buildx @@ -122,19 +117,19 @@ jobs: - name: Pull latest onbuild image run: | - docker pull gcr.io/cloud-marketplace-tools/k8s/deployer_helm/onbuild + docker pull ${{ vars.ONBUILD_IMAGE }} - name: Extract metadata id: meta uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 with: - images: ${{ env.DEPLOYER }} + images: ${{ vars.DEPLOYER_IMAGE }} tags: | # set latest tag for default branch type=raw,value=latest,enable={{is_default_branch}} type=match,pattern=\d.\d type=match,pattern=\d.\d.\d - annotations: ${{ secrets.SERVICE_ANNOTATION }} + annotations: ${{ vars.SERVICE_ANNOTATION }} - name: Build and push uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0