We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06bb931 commit b9c9e6fCopy full SHA for b9c9e6f
.github/workflows/docker.yml
@@ -0,0 +1,30 @@
1
+name: Build and Push Docker
2
+
3
+on:
4
+ push:
5
6
+jobs:
7
+ docker:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ packages: write
11
+ steps:
12
+ - uses: actions/checkout@v4
13
14
+ - name: Get short SHA
15
+ id: sha
16
+ run: echo "short=$(echo ${{ github.sha }} | cut -c1-6)" >> $GITHUB_OUTPUT
17
18
+ - uses: docker/login-action@v3
19
+ with:
20
+ registry: ghcr.io
21
+ username: ${{ github.actor }}
22
+ password: ${{ secrets.GITHUB_TOKEN }}
23
24
+ - uses: docker/build-push-action@v5
25
26
+ context: .
27
+ push: ${{ github.ref == 'refs/heads/master' }}
28
+ tags: |
29
+ ghcr.io/${{ github.repository }}:latest
30
+ ghcr.io/${{ github.repository }}:${{ steps.sha.outputs.short }}
0 commit comments