-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (53 loc) · 2 KB
/
build-linux-image.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
54
55
56
57
58
name: linux/amd64
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
repository_dispatch: # Allows action to be triggered via webhook
workflow_dispatch: # Allows action to be run manually from the Actions tab
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
uses: docker/[email protected]
- name: Pull Latest Linux Base Image
run: docker pull lacledeslan/gamesvr-hldms
- name: Build Linux Image
uses: docker/[email protected]
with:
context: .
file: ./linux.Dockerfile
tags: |
lacledeslan/gamesvr-hldms-freeplay:latest
ghcr.io/lacledeslan/gamesvr-hldms-freeplay:latest
build-args: |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }})
SOURCE_COMMIT=${{ github.sha }}
no-cache: true
- name: Test Linux Image
run: docker run --rm lacledeslan/gamesvr-hldms-freeplay:latest /app/ll-tests/gamesvr-hldms-freeplay.sh
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Push to Docker HUB
if: ${{ github.event_name != 'pull_request' }}
run: docker push lacledeslan/gamesvr-hldms-freeplay:latest
- name: Push to GitHub Packages
if: ${{ github.event_name != 'pull_request' }}
run: docker push ghcr.io/lacledeslan/gamesvr-hldms-freeplay:latest