-
-
Notifications
You must be signed in to change notification settings - Fork 27
81 lines (69 loc) · 1.81 KB
/
feature-branch.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Feature Branch
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
push:
branches:
- main
- release/v*
paths-ignore:
- '.github/**'
- 'docs/**'
- 'examples/**'
- 'test/**'
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
ci-go:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Test Snapshot Release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --config ./dev.goreleaser.yaml --clean --snapshot
- name: Upload Test Release Assets
uses: actions/upload-artifact@v4
with:
name: github-status-updater
path: dist/*
retention-days: 3
ci-docker:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v4
- name: Build
id: build
uses: cloudposse/github-action-docker-build-push@1.15.1
with:
registry: ghcr.io
organization: "${{ github.event.repository.owner.login }}"
repository: "${{ github.event.repository.name }}"
login: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
platforms: linux/amd64,linux/arm64
release:
if: github.event_name == 'push'
needs: [ci-go, ci-docker]
uses: cloudposse/.github/.github/workflows/shared-go-auto-release.yml@main
with:
publish: true
secrets: inherit