Skip to content

Commit f901b1f

Browse files
committed
feat: add docker build
1 parent 82991b9 commit f901b1f

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

.github/workflows/release.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,22 @@ jobs:
4848
run: |
4949
github-assets-uploader -f authorizer-${VERSION}-windows-amd64.zip -mediatype application/zip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} && \
5050
github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION}
51+
- name: Log in to Docker Hub
52+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
53+
with:
54+
username: ${{ secrets.DOCKER_USERNAME }}
55+
password: ${{ secrets.DOCKER_PASSWORD }}
5156

52-
# - uses: wangyoucao577/[email protected]
53-
# with:
54-
# github_token: ${{ secrets.RELEASE_TOKEN }}
55-
# goos: ${{ matrix.goos }}
56-
# goarch: ${{ matrix.goarch }}
57-
# build_command: make clean && make
58-
# md5sum: FALSE
59-
# extra_files: .env.sample app build template
57+
- name: Extract metadata (tags, labels) for Docker
58+
id: meta
59+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
60+
with:
61+
images: my-docker-hub-namespace/my-docker-hub-repository
62+
63+
- name: Build and push Docker image
64+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
65+
with:
66+
context: .
67+
push: true
68+
tags: ${{ steps.meta.outputs.tags }}
69+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)