Skip to content

Commit f3c24b6

Browse files
committed
Merge branch 'main' of github.com:keinenclue/sasm-docker into main
2 parents 4440e1a + 2a332e2 commit f3c24b6

File tree

3 files changed

+86
-38
lines changed

3 files changed

+86
-38
lines changed

.github/workflows/dockerimage.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: "Build docker image"
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-push-docker:
11+
name: Build and push Docker image to GhCr
12+
runs-on: ubuntu-latest
13+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
14+
steps:
15+
- name: Check out the repo
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v1
20+
21+
- name: Log in to Docker Hub
22+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Extract metadata (tags, labels) for Docker
29+
id: meta
30+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
31+
with:
32+
images: ghcr.io/keinenclue/sasm-docker
33+
tags: type=ref,event=tag
34+
35+
- name: Build and push Docker image
36+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
37+
with:
38+
context: .
39+
push: true
40+
tags: ${{ steps.meta.outputs.tags }}
41+
labels: ${{ steps.meta.outputs.labels }}
42+
43+
build-and-push-docker-manually:
44+
name: Build and push Docker image to GhCr with previous tag
45+
runs-on: ubuntu-latest
46+
if: github.event_name == 'workflow_dispatch'
47+
steps:
48+
- name: Check out the repo
49+
uses: actions/checkout@v2
50+
with:
51+
fetch-depth: 0 # Required due to the weg Git works, without it this action won't be able to find any or the correct tags
52+
53+
- name: Set up Docker Buildx
54+
uses: docker/setup-buildx-action@v1
55+
56+
- name: Log in to Docker Hub
57+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
58+
with:
59+
registry: ghcr.io
60+
username: ${{ github.actor }}
61+
password: ${{ secrets.GITHUB_TOKEN }}
62+
63+
- name: 'Get Previous tag'
64+
id: previoustag
65+
uses: "WyriHaximus/github-action-get-previous-tag@v1"
66+
67+
- name: Extract metadata (tags, labels) for Docker
68+
id: meta
69+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
70+
with:
71+
images: ghcr.io/keinenclue/sasm-docker
72+
tags: type=semver,pattern={{version}},value=${{ steps.previoustag.outputs.tag }}
73+
flavor: |
74+
latest=true
75+
76+
- name: Build and push Docker image
77+
uses: docker/build-push-action@v2
78+
with:
79+
context: .
80+
push: true
81+
tags: ${{ steps.meta.outputs.tags }}
82+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -69,44 +69,10 @@ jobs:
6969
name: launcher
7070
path: launcher/out/*
7171

72-
build-and-push-docker:
73-
name: Build and push Docker image to GhCr
74-
runs-on: ubuntu-latest
75-
needs: build-launcher
76-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
77-
steps:
78-
- name: Check out the repo
79-
uses: actions/checkout@v2
80-
81-
- name: Set up Docker Buildx
82-
uses: docker/setup-buildx-action@v1
83-
84-
- name: Log in to Docker Hub
85-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
86-
with:
87-
registry: ghcr.io
88-
username: ${{ github.actor }}
89-
password: ${{ secrets.GITHUB_TOKEN }}
90-
91-
- name: Extract metadata (tags, labels) for Docker
92-
id: meta
93-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
94-
with:
95-
images: ghcr.io/keinenclue/sasm-docker
96-
tags: type=ref,event=tag
97-
98-
- name: Build and push Docker image
99-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
100-
with:
101-
context: .
102-
push: true
103-
tags: ${{ steps.meta.outputs.tags }}
104-
labels: ${{ steps.meta.outputs.labels }}
105-
10672
tagged-release:
10773
name: "Tagged Release"
10874
runs-on: "ubuntu-latest"
109-
needs: [build-and-push-docker, build-launcher]
75+
needs: build-launcher
11076
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
11177

11278
steps:

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ RUN apk add build-base qt5-qtbase-dev unzip curl \
1010
msttcorefonts-installer && \
1111
update-ms-fonts && \
1212
fc-cache -f && \
13-
curl -L -o sasm.zip https://github.com/Dman95/SASM/archive/refs/tags/v3.12.1.zip && \
13+
curl -L -o sasm.zip https://codeload.github.com/schreiberx/SASM/zip/refs/heads/master && \
1414
unzip sasm.zip -d /home && \
15-
cd /home/SASM-3.12.1 && qmake-qt5 && make && make install
15+
cd /home/SASM-master && qmake-qt5 && make && make install
1616

1717

1818
# Source: https://gist.github.com/bcardiff/85ae47e66ff0df35a78697508fcb49af#gistcomment-2078660
@@ -40,4 +40,4 @@ COPY --from=build /usr/share/sasm /usr/share/sasm
4040
# Install fonts
4141
RUN fc-cache -f -v
4242

43-
CMD ["sasm"]
43+
CMD ["sasm"]

0 commit comments

Comments
 (0)