Skip to content

Commit

Permalink
feat(ci): build and push docker image to latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Aug 27, 2023
1 parent adb2dba commit 5efc1c0
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/docker_push_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy To Dockerhub(Latest)

on:
push:
branches: [ main ]

jobs:
latest:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: mkdir -p ./temp && go build -o ./temp/linux_amd64/hitokoto_reviewer ./main.go
-
name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: hitokoto/reviewer:latest
file: ./manifest/docker/Dockerfile
context: .

0 comments on commit 5efc1c0

Please sign in to comment.