-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (69 loc) · 2.05 KB
/
build-base-3.19.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: build-base/alpine
on:
push:
branches-ignore:
- "renovate/**"
paths:
- "build-base/3.19/**"
- "!build-base/3.19/README.md"
- ".github/workflows/build-base-3.19.yml"
pull_request:
types:
- opened
- synchronize
- labeled
- reopened
paths:
- "build-base/3.19/**"
- "!build-base/3.19/README.md"
- ".github/workflows/build-base-3.19.yml"
schedule:
- cron: '0 7 * * *'
workflow_dispatch:
jobs:
build:
name: docker-build
permissions:
packages: write
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: build-base
IMAGE_TAG: 3.19
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set SOURCE_DATE_EPOCH
id: set-source-date-epoch
run: |
echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >>"${GITHUB_ENV}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v5
env:
SOURCE_DATE_EPOCH: ${{ steps.set-source-date-epoch.outputs.SOURCE_DATE_EPOCH }}
with:
context: build-base/3.19
platforms: linux/amd64,linux/arm64
provenance: true
sbom: true
cache-from: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'