Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

fix go sum

fix go sum #94

name: docker-app-push
on:
push:
branches:
- 'main'
paths:
- "src/**"
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Set Docker tag based on release name or commit hash
run: |
if [[ "${{ github.event.release.name }}" != "" ]]; then
echo "DOCKER_TAG=${{ github.event.release.name }}" >> $GITHUB_ENV
else
echo "DOCKER_TAG=${{ github.sha }}" >> $GITHUB_ENV
fi
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/draft-backend:${{ env.DOCKER_TAG }}