Skip to content

chore: keep layers clean during build (#1838) #310

chore: keep layers clean during build (#1838)

chore: keep layers clean during build (#1838) #310

name: Build and push new dev tools image
on:
push:
branches:
- "master"
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
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033' # v1.1.1
with:
workload_identity_provider: '${{ secrets.GCP_WIF_PROVIDER }}'
service_account: '${{ secrets.GCP_WIF_SA_EMAIL }}'
- uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b # v1.1.1
with:
version: "410.0.0"
project_id: ${{ env.PROJECT_ID }}
- name: Build
run: |-
gcloud auth configure-docker -q
cd infra/build && make build-image-developer-tools
- name: Push
run: |-
cd infra/build && make release-image-developer-tools
- name: Open issue if failed
if: ${{ failure() }}
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
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 }}',
assignee: 'bharathkkb'
})