-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.08 KB
/
build-container.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
name: Build container image
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
# From <https://github.com/actions/runner-images/issues/2840>
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: checkout files in repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io
uses: docker/login-action@v2
if: github.ref == 'refs/heads/master'
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push
uses: docker/[email protected]
with:
files: docker/docker-bake.hcl
targets: |
default
gpu
push: ${{ github.event_name != 'pull_request' }}
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max