We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 672228a commit 4cd8c61Copy full SHA for 4cd8c61
.github/workflows/publish.yml
@@ -0,0 +1,33 @@
1
+name: Publish
2
+
3
+on:
4
+ push:
5
+ branches: ["master"]
6
7
+jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ name: Publish
11
+ steps:
12
+ - name: Checkout Repository
13
+ uses: actions/checkout@v4
14
+ - name: Login to GitHub Container Registry
15
+ uses: docker/login-action@v3
16
+ with:
17
+ registry: ghcr.io
18
+ username: ${{ github.actor }}
19
+ password: ${{ secrets.GITHUB_TOKEN }}
20
+ - name: Generate tag
21
+ id: tag
22
+ run: |
23
+ ts=$(date +%s)
24
+ branch=${GITHUB_REF##*/}
25
+ echo "IMAGE_ID=${branch}-${GITHUB_SHA::8}-${ts}" >> "$GITHUB_OUTPUT"
26
+ - name: Publish Docker image
27
+ uses: docker/build-push-action@v5
28
29
+ context: .
30
+ push: true
31
+ tags: |
32
+ ghcr.io/jroy/disgit:latest
33
+ ghcr.io/jroy/disgit:${{ steps.tag.outputs.IMAGE_ID }}
0 commit comments