-
Notifications
You must be signed in to change notification settings - Fork 377
46 lines (42 loc) · 1.31 KB
/
test-snapshot.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
46
# Running goreleaser with the snapshot flag allows us to run some custom validations
# on our build without publishing: https://goreleaser.com/customization/snapshots/
name: test-snapshot
on:
push:
paths:
- '.goreleaser/**'
pull_request:
paths:
- 'goreleaser/**'
jobs:
build-linux:
runs-on: ubuntu-latest
env:
# https://goreleaser.com/customization/docker_manifest/
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Code checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Docker Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Run GoReleaser Snapshot
uses: goreleaser/goreleaser-action@v2
with:
version: v0.184.0
args: release -f .goreleaser/linux.yml --rm-dist --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACTORY_SECRET: ${{ secrets.ARTIFACTORY_SECRET }}