-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (38 loc) · 1.58 KB
/
base-image.yml
File metadata and controls
50 lines (38 loc) · 1.58 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
43
44
45
46
47
48
49
50
name: Base Image
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
env:
PROJECT_ID: casecomp-495718
IMAGE: us-docker.pkg.dev/casecomp-495718/casecomp-node24/node24
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3
with:
workload_identity_provider: projects/129850122606/locations/global/workloadIdentityPools/github-pool/providers/github-provider
service_account: casecomp-deploy@casecomp-495718.iam.gserviceaccount.com
- uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: "1.24"
- name: Install apko
run: go install chainguard.dev/apko@latest
- name: Build image
run: apko build images/node24/apko.yaml ${{ env.IMAGE }}:latest image.tar
- name: Configure Docker auth
run: gcloud auth configure-docker us-docker.pkg.dev --quiet
- name: Load image
run: docker load < image.tar
- name: Test image
run: bash images/node24/test.sh ${{ env.IMAGE }}:latest-amd64
- name: Push image
run: |
docker tag ${{ env.IMAGE }}:latest-amd64 ${{ env.IMAGE }}:latest
docker tag ${{ env.IMAGE }}:latest-amd64 ${{ env.IMAGE }}:${{ github.sha }}
docker push ${{ env.IMAGE }}:latest
docker push ${{ env.IMAGE }}:${{ github.sha }}