-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (35 loc) · 974 Bytes
/
new_docker_image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: New Docker image
on:
pull_request:
branches: [ main, v0.1 ]
paths:
- ts/Dockerfile.tmpl
- release_image/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: docker login
env:
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}
run: echo $DOCKER_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
- name: build the image
env:
# hack to avoid hitting the db
DB_CONNECTION_STRING: sqlite:///
run: cd release_image && go run .