-
Notifications
You must be signed in to change notification settings - Fork 29
41 lines (33 loc) · 1.05 KB
/
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
name: Build Docker container
on: [ workflow_dispatch ]
jobs:
build_container:
name: Build container
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- id: string
uses: ASzc/change-string-case-action@v2
with:
string: ${{ github.repository_owner }}
- name: Build x64 binary
run: mkdir build && cd build && cmake .. && cmake --build . --parallel 2 --target sqfvm
env:
CC: clang
CXX: clang++
- name: Sanity check
run: build/sqfvm --version
- name: Move binary to docker directory
run: mv build/sqfvm docker/
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & push
uses: docker/build-push-action@v2
with:
context: docker
push: true
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/sqfvm:latest