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 b1de4ba commit dce74faCopy full SHA for dce74fa
.github/workflows/docker-image.yml
@@ -0,0 +1,27 @@
1
+name: Docker Image CI
2
+
3
+on:
4
+ push:
5
+ branches: [ docker/* ]
6
7
+jobs:
8
+ login:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout
12
+ uses: actions/checkout@v4
13
14
+ - name: Set Branch Name
15
+ run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/docker/})" >> $GITHUB_ENV
16
17
+ - name: Login to GitHub Container Registry
18
+ uses: docker/login-action@v3
19
+ with:
20
+ registry: ghcr.io
21
+ username: ${{ github.actor }}
22
+ password: ${{ secrets.GITHUB_TOKEN }}
23
24
+ - name: Build the Docker image
25
+ run: |
26
+ docker build . -t ghcr.io/${{ github.repository }}:${{ env.BRANCH_NAME }}
27
+ docker push ghcr.io/${{ github.repository }}:${{ env.BRANCH_NAME }}
0 commit comments