Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -106,35 +101,35 @@ 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
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1

- 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
Expand Down
Loading