-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (35 loc) · 1.14 KB
/
build-and-publish-images.yml
File metadata and controls
42 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build and Publish GCE Images
on:
push:
branches:
- main
paths:
- 'vm/**'
- '.github/workflows/build-and-publish-images.yml'
workflow_dispatch:
jobs:
build-gce-image:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed # v2
with:
project_id: ${{ env.PROJECT_ID }}
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f # v2
- name: Install Packer
uses: hashicorp/setup-packer@76e3039aa951aa4e6efe7e6ee06bc9ceb072142d # main
with:
version: "latest"
- name: Build GCE image with Packer
working-directory: vm
run: |
make build-actions-runner-image