Skip to content

chore: Update Tools to 1.26.0 (#3245) #479

chore: Update Tools to 1.26.0 (#3245)

chore: Update Tools to 1.26.0 (#3245) #479

name: Build and push new dev tools image
on:
push:
branches:
- "main"
paths:
- "infra/build/**"
- ".github/workflows/build-push-cft-devtools.yml"
env:
PROJECT_ID: ${{ secrets.GCR_PROJECT_ID }}
jobs:
build-push-dev-tools:
name: Build and push new CFT dev tools image
runs-on: ubuntu-latest
if: github.repository == 'GoogleCloudPlatform/cloud-foundation-toolkit'
permissions:
contents: 'read'
id-token: 'write'
issues: 'write'
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093' # v3.0.0
with:
workload_identity_provider: '${{ secrets.GCP_WIF_PROVIDER }}'
service_account: '${{ secrets.GCP_WIF_SA_EMAIL }}'
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
with:
project_id: ${{ env.PROJECT_ID }}
- name: Build
run: |-
gcloud auth configure-docker -q
cd infra/build && make build-image-developer-tools
- name: Filter paths for push
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
src:
- "infra/build/**"
- if: steps.filter.outputs.src == 'true'
name: Push
env:
GITHUB_SHA: ${{ github.sha }}
run: |-
cd infra/build && make release-image-developer-tools
- name: Open issue if push failed
if: ${{ failure() && steps.filter.outputs.src == 'true' }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |-
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'build-push-dev-tools job failed',
body: 'Logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}',
assignees: ['bharathkkb','apeabody']
})