-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (34 loc) · 1.12 KB
/
build-runner.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
name: Build Runner
on:
push:
branches: [master, dev]
paths:
- 'linux/**'
pull_request:
branches: [master]
paths:
- 'linux/**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/export-runtime
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Cleanup Disk
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: Build Image
run: |
docker buildx create --name builder --use --driver docker-container
make -C linux build BUILDX_ARGS="--cache-from=type=gha --cache-to=type=gha,mode=max --load"
- name: Push Image
if: ${{ github.event_name == 'push' }}
run: |-
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
test "$GITHUB_REF_NAME" = master && \
make -C linux push TAG=latest || \
make -C linux push TAG="$GITHUB_REF_NAME"