-
-
Notifications
You must be signed in to change notification settings - Fork 160
47 lines (40 loc) · 1.24 KB
/
base-image.yaml
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
name: Update base image
on:
push:
branches:
- main
paths:
- image/Dockerfile-base
- .github/workflows/base-image.yaml
schedule:
- cron: 0 1 * * 1
permissions:
contents: read
jobs:
push_image:
runs-on: ubuntu-24.04
name: Docker Images
env:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Registry login
run: |
echo $DOCKER_TOKEN | docker login --username danielflook --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Base image
run: |
docker buildx build \
--tag danielflook/terraform-github-actions-base:$GITHUB_RUN_ID \
--tag danielflook/terraform-github-actions-base:latest \
--platform linux/amd64,linux/arm64 \
--attest type=provenance,mode=max,builder-id=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID \
--file image/Dockerfile-base \
--push \
--iidfile manifest-list-digest.txt \
image
echo "digest=$(<manifest-list-digest.txt)" >> "$GITHUB_OUTPUT"