Skip to content

build(deps): bump google.golang.org/api #53

build(deps): bump google.golang.org/api

build(deps): bump google.golang.org/api #53

Workflow file for this run

name: build-images
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull-request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
env:
REGISTRY: ghcr.io
jobs:
list:
runs-on: ubuntu-latest
outputs:
images: ${{ steps.output-images.outputs.images }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: list images
id: output-images
run: |
echo "images=$(find tekton/images/* -maxdepth 1 -type d -printf '%f\n' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: list
strategy:
matrix:
image: ${{fromJSON(needs.list.outputs.images)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@cf79a64fed8a943fb1073260883d08fe0dfb4e56 # v45.0.7
with:
files: |
tekton/images/${{ matrix.image }}/**
- name: changed files
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo ${{ steps.changed-files.outputs.any_changed }}
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
- name: Log in to the Container registry
if: steps.changed-files.outputs.any_changed == 'true' # || github.event_name != 'pull_request'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # 343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: steps.changed-files.outputs.any_changed == 'true' # || github.event_name != 'pull_request'
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.image }}
- name: Build and push Docker image
if: steps.changed-files.outputs.any_changed == 'true' # || github.event_name != 'pull_request'
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v5
with:
context: tekton/images/${{ matrix.image }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}