-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (34 loc) · 1.17 KB
/
make-release.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
name: Create docker release and publish to pkg.go.dev
on:
push:
tags:
- v*.**
permissions:
contents: read
jobs:
push_to_registry:
name: Publish a new Docker image and publish a new version in pkg.go.dev
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Log in to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991
with:
context: .
push: true
tags: ghcr.io/np-guard/net-top-analyzer:${{ github.ref_name }}
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version: 'stable'
- name: Publish on pkg.go.dev
run: GOPROXY=proxy.golang.org go list -m github.com/np-guard/cluster-topology-analyzer/v2@${{ github.ref_name }}