Skip to content

Workflows updated from AnchorFree/workflows:e0d6b00 #18

Workflows updated from AnchorFree/workflows:e0d6b00

Workflows updated from AnchorFree/workflows:e0d6b00 #18

Workflow file for this run

# Workflow automatically managed by https://github.com/AnchorFree/workflows/
# DO NOT EDIT HERE
name: Build and push Docker image
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
release:
types:
- released
permissions:
id-token: write
contents: read
jobs:
docker_build:
runs-on: ubuntu-latest
steps:
- name: Import Secrets
uses: hashicorp/vault-action@v2.7.2
id: secrets
with:
url: https://vault.afdevops.com
method: jwt
role: jwt-github-role
path: jwt-github
jwtGithubAudience: https://github.com/AnchorFree
exportEnv: false
secrets: |
secret/devops/cloud_providers/gcp/aura-networking/gar/gh-actions-rw auth | GAR_TOKEN
- name: Login to registry - GAR
uses: docker/login-action@v2
with:
registry: us-docker.pkg.dev
username: _json_key
password: ${{ steps.secrets.outputs.GAR_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
us-docker.pkg.dev/aura-networking/docker-registry/${{ github.repository }}
tags: |
type=schedule
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}