Skip to content

Commit 7aa788f

Browse files
authored
Create backend.yml
1 parent 1247a5d commit 7aa788f

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/backend.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Production Build
2+
on:
3+
push:
4+
branches: [ master ]
5+
6+
env:
7+
APP_NAME: get_special_hole
8+
9+
jobs:
10+
docker:
11+
runs-on: ubuntu-latest
12+
working-directory: ./backend
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@master
16+
17+
# - name: Set up Go
18+
# uses: actions/setup-go@master
19+
# with:
20+
# go-version: 1.21.1
21+
#
22+
# - run: go version
23+
# - name: Automated Testing
24+
# env:
25+
# MODE: test
26+
# run: go test -v -count=1 -json -tags release ./tests/...
27+
28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@master
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@master
33+
34+
- name: Login to DockerHub
35+
uses: docker/login-action@master
36+
with:
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
40+
- name: Build and push
41+
id: docker_build
42+
uses: docker/build-push-action@master
43+
with:
44+
push: true
45+
tags: |
46+
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:latest
47+
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:master

0 commit comments

Comments
 (0)