forked from google/oss-fuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.3 KB
/
build_and_upload_images.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
name: Build and Push Latest Docker Images
on:
push:
branches:
- 'release/**'
pull_request:
branches:
- 'release/**'
release:
types: [published]
permissions:
contents: read
packages: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log into GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
- name: Build and upload based on release cache, update cache
if: github.event_name == 'push'
run: |
BRANCH_NAME="${{ github.ref }}"
infra/base-images/aixcc_build_all.sh --cache-to "${BRANCH_NAME#refs/heads/}" "${{ github.sha }}"
- name: Build and upload based on release cache, no cache update
if: github.event_name == 'pull_request'
run: |
infra/base-images/aixcc_build_all.sh --cache-from "${{ github.base_ref }}" "${{ github.sha }}"
- name: Build and upload for release
if: github.event_name == 'release'
run: |
infra/base-images/aixcc_build_all.sh ${{ github.event.release.tag_name }}