Update Terraform google to v6.23.0 #371
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub CR Build and Push | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} # github.repository as <account>/<repo> | |
jobs: | |
build: | |
name: Build and push Docker | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Extract image tags and labels - terraform-tools | |
uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/terraform-tools | |
- name: Build and Push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: docker-files/ | |
file: docker-files/terraform-env.Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/terraform-tools:latest | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Extract image tags and labels - azure-tools | |
uses: docker/metadata-action@v5 | |
id: metab | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/azure-tools | |
- name: Build and Push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: docker-files/ | |
file: docker-files/azure-env.Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/azure-tools:latest | |
labels: ${{ steps.metab.outputs.labels }} |