chore(deps): update google/cloud-sdk docker tag to v449 #1395
Workflow file for this run
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: Create and publish a Docker image | |
on: | |
push: | |
branches: ['main'] | |
paths: | |
- 'ci/dockerfiles/**' | |
- '.github/workflows/image.yml' | |
- '.tool-versions' | |
pull_request: | |
paths: | |
- 'ci/dockerfiles/**' | |
- '.github/workflows/image.yml' | |
- '.tool-versions' | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
# This is used to complete the identity challenge | |
# with sigstore/fulcio when running outside of PRs. | |
id-token: write | |
strategy: | |
matrix: | |
image_suffix: ["deploy", "test", "tools"] | |
name: Build and Push app-autoscaler-ci-${{ matrix.image_suffix }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.image_suffix }} | |
- name: Get ginkgo version from autoscaler-release | |
id: ginkgo | |
run: | | |
version=$(grep "ginkgo " .tool-versions| cut -f 2 -d " ") | |
echo "GINKGO version from .tool-versions: \'${version}\'" | |
echo "::set-output name=version::${version}" | |
- id: get-golang-version | |
shell: bash | |
run: | | |
version=$(grep "golang " .tool-versions| cut -f 2 -d " ") | |
echo "Go version from .tool-versions: \'${version}\'" | |
echo "::set-output name=version::${version}" | |
- name: Build and push | |
id: build-and-push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ci/dockerfiles/autoscaler-${{ matrix.image_suffix }} | |
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.image_suffix }}:main | |
build-args: | | |
GINKGO_VERSION=v${{ steps.ginkgo.outputs.version }} | |
GO_VERSION=${{ steps.get-golang-version.outputs.version }} |