Skip to content

Commit

Permalink
chore: add a workflow to push to a docker repository to share with ex…
Browse files Browse the repository at this point in the history
…ternal clients (#10484)
  • Loading branch information
rafaelromcar-parabol authored Nov 15, 2024
1 parent 4275325 commit 8d53813
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-external.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Ironbank Image Upload

on:
workflow_dispatch:
inputs:
version_number:
description: "Version number of the Parabol application image to process"
required: true

jobs:
pull-and-upload:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Set up Docker
uses: docker/setup-buildx-action@v3

- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
with:
token_format: "access_token"
workload_identity_provider: ${{ secrets.GCP_WI_PROVIDER_NAME }}
service_account: ${{ secrets.GCP_SA_EMAIL }}

- uses: "docker/login-action@v3"
with:
registry: ${{ secrets.GCP_DOCKER_REGISTRY }}
username: "oauth2accesstoken"
password: "${{ steps.auth.outputs.access_token }}"

- name: Pull Docker image from GCP
run: docker pull ${{ secrets.GCP_AR_PARABOL}}:v${{ github.event.inputs.version_number }}

- name: Push Docker image to the external repository
run: |-
gcloud container images add-tag -q \
${{ secrets.GCP_AR_PARABOL }}:v${{ github.event.inputs.version_number }} \
${{ secrets.GCP_AR_PARABOL_EXTERNAL }}:v${{ github.event.inputs.version_number }}

0 comments on commit 8d53813

Please sign in to comment.