chore(oauth): Replace deprecated check_token
usage with introspect
#2451
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: ["tools"] | |
name: Build and Push app-autoscaler-release-${{ 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 "version=${version}" >> "$GITHUB_OUTPUT" | |
- id: get-golang-version | |
shell: bash | |
run: | | |
version=$(grep "golang " .tool-versions| cut -f 2 -d " ") | |
echo "Go version from .tool-versions: \'${version}\'" | |
echo "version=${version}" >> "$GITHUB_OUTPUT" | |
- name: Build and push | |
id: build-and-push | |
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6 | |
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 }} |