Skip to content

Commit b39f61c

Browse files
authored
Merge pull request #1 from msalsouri/cd
Adding Dockerfile to workflow
2 parents 8ddc89e + 954ef40 commit b39f61c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

publish.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to Docker
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
packages: write
8+
contents: read
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
# Add your test steps here if needed...
16+
- name: Docker meta
17+
id: meta
18+
uses: docker/metadata-action@v5
19+
with:
20+
images: ghcr.io/msalsouri/publish-packages/game
21+
tags: type=sha
22+
- name: Login to GHCR
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.repository_owner }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Build container
29+
uses: docker/build-push-action@v5
30+
with:
31+
context: .
32+
push: true
33+
tags: ${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)