Skip to content

build(deps): bump docker/metadata-action from 4.6.0 to 5.0.0 #312

build(deps): bump docker/metadata-action from 4.6.0 to 5.0.0

build(deps): bump docker/metadata-action from 4.6.0 to 5.0.0 #312

Workflow file for this run

name: Docker
on:
pull_request: {}
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
outputs:
meta_json: ${{ steps.meta.outputs.json }}
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: Docker Meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
flavor: |
latest=true
images: |
gcr.io/pomerium-registry/verify
pomerium/verify
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55
- name: gcloud authenticate
if: ${{ github.event_name != 'pull_request' }}
uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033
with:
project_id: ${{ secrets.GCP_PRODUCTION_PROJECT_ID }}
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: gcloud sdk
if: ${{ github.event_name != 'pull_request' }}
uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b
- name: gcloud docker setup
if: ${{ github.event_name != 'pull_request' }}
run: gcloud auth configure-docker
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
needs: publish
steps:
- name: checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: gcloud authenticate
uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033
with:
project_id: ${{ secrets.GCP_PRODUCTION_PROJECT_ID }}
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: gcloud sdk
uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b
- name: deploy to cloud run
uses: google-github-actions/deploy-cloudrun@e62f655d5754bec48078a72edc015367b01ee97b
if: ${{ github.event_name != 'pull_request' }}
with:
image: ${{ fromJSON(needs.publish.outputs.meta_json).tags[0] }}
service: verify
flags: "--allow-unauthenticated"