-
Notifications
You must be signed in to change notification settings - Fork 83
48 lines (47 loc) · 1.42 KB
/
snapshot.yaml
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
46
47
48
name: snapshot
# A dedicated action to build a snapshot images, rest will be handled by release action.
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x
-
name: Set up UPX
run: sudo apt-get update && sudo apt-get install upx-ucl
-
name: Login to Docker Registry
run: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
-
name: Run GoReleaser for Snapshot
uses: goreleaser/goreleaser-action@v1
with:
version: v0.180.3
# not using --snapshot because we want to push images for snapshots
args: release --rm-dist --config=.goreleaser-snapshot.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}