forked from kubev2v/forklift
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (45 loc) · 1.51 KB
/
build-push-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
name: Build and push images
on:
push:
branches:
- main
- release-*
workflow_dispatch:
jobs:
build_push:
runs-on: ubuntu-latest
env:
REGISTRY: quay.io
# Set tag 'latest' on main branch
REGISTRY_TAG: ${{ (github.head_ref||github.ref_name)=='main' && 'latest' || (github.head_ref||github.ref_name) }}
REGISTRY_ORG: kubev2v
USE_BAZEL_VERSION: 5.4.0
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: false
docker-images: false
- name: Checkout forklift
uses: actions/checkout@v4
- name: Login to quay.io with bot account
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Bazel cache
id: bazel-cache
uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel-cache-${{ hashFiles('WORKSPACE') }}
- name: Build and push images to quay.io
run: |
cd ${GITHUB_WORKSPACE}
./hack/release-images.sh