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: | 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}-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} 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 - name: Extract metadata (tags, labels) for Docker
# with: id: meta
# github_token: ${{ secrets.RELEASE_TOKEN }} uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
# goos: ${{ matrix.goos }} with:
# goarch: ${{ matrix.goarch }} images: my-docker-hub-namespace/my-docker-hub-repository
# build_command: make clean && make
# md5sum: FALSE - name: Build and push Docker image
# extra_files: .env.sample app build template uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}