Skip to content

Commit 006ccb9

Browse files
committed
enable workflow_dispatch
1 parent abcbb8c commit 006ccb9

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: build
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -14,31 +15,31 @@ jobs:
1415
packages: write
1516

1617
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
20-
- name: Extract Version from Dockerfile
21-
id: docker_meta
22-
run: |
23-
VERSION_LABEL=$(grep 'org.opencontainers.image.version' ./Dockerfile | cut -d '"' -f 2)
24-
echo "VERSION=$VERSION_LABEL" >> $GITHUB_OUTPUT
25-
26-
- name: Set up Docker Buildx
27-
uses: docker/setup-buildx-action@v3
28-
29-
- name: Log in to GitHub Container Registry
30-
uses: docker/login-action@v3
31-
with:
32-
registry: ghcr.io
33-
username: ${{ github.actor }}
34-
password: ${{ secrets.GITHUB_TOKEN }}
35-
36-
- name: Build and push Docker image
37-
uses: docker/build-push-action@v5
38-
with:
39-
context: .
40-
file: ./Dockerfile
41-
push: true
42-
tags: |
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Extract Version from Dockerfile
22+
id: docker_meta
23+
run: |
24+
VERSION_LABEL=$(grep 'org.opencontainers.image.version' ./Dockerfile | cut -d '"' -f 2)
25+
echo "VERSION=$VERSION_LABEL" >> $GITHUB_OUTPUT
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to GitHub Container Registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Build and push Docker image
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: .
41+
file: ./Dockerfile
42+
push: true
43+
tags: |
4344
ghcr.io/${{ github.repository }}:${{ steps.docker_meta.outputs.VERSION }}
44-
ghcr.io/${{ github.repository }}:latest
45+
ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)