feat: add docker build

This commit is contained in:
Lakhan Samani 2021-09-11 22:39:49 +05:30
parent 82991b9949
commit f901b1fe4f

View File

@ -48,12 +48,22 @@ jobs:
run: |
github-assets-uploader -f authorizer-${VERSION}-windows-amd64.zip -mediatype application/zip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION} && \
github-assets-uploader -f authorizer-${VERSION}-linux-amd64.tar.gz -mediatype application/gzip -repo authorizerdev/authorizer -token ${{secrets.RELEASE_TOKEN}} -tag ${VERSION}
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# - uses: wangyoucao577/go-release-action@v1.20
# with:
# github_token: ${{ secrets.RELEASE_TOKEN }}
# goos: ${{ matrix.goos }}
# goarch: ${{ matrix.goarch }}
# build_command: make clean && make
# md5sum: FALSE
# extra_files: .env.sample app build template
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: my-docker-hub-namespace/my-docker-hub-repository
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}