File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 5353 - uses : actions/checkout@v3
5454 - uses : golangci/golangci-lint-action@v3
5555 with :
56- version : v1.43.0
56+ version : v1.50.1
5757
5858 - name : Go mod
5959 env :
Original file line number Diff line number Diff line change @@ -31,20 +31,28 @@ jobs:
3131 username : ${{ github.repository_owner }}
3232 password : ${{ secrets.GITHUB_TOKEN }}
3333
34+ - name : Prepare Env Vars
35+ run : |
36+ echo GHCR_USER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
37+
3438 # Publish a new release from git tag.
3539 -
uses :
goreleaser/[email protected] 3640 if : startsWith(github.ref, 'refs/tags/')
3741 with :
3842 version : latest
3943 args : release --rm-dist
4044 env :
45+ DOCKERHUB_USER : ${{ secrets.DOCKER_LOGIN }}
46+ GHCR_USER : ${{ env.GHCR_USER }}
4147 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4248
4349 # Publish nightly build.
4450 -
uses :
goreleaser/[email protected] 45- if : github.event_name == 'schedule'
51+ if : ${{ github.repository_owner == 'mxpv' && github. event_name == 'schedule' }}
4652 with :
4753 version : latest
4854 args : release --rm-dist --nightly
4955 env :
56+ DOCKERHUB_USER : ${{ secrets.DOCKER_LOGIN }}
57+ GHCR_USER : ${{ env.GHCR_USER }}
5058 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ builds:
2121
2222dockers :
2323 - image_templates :
24- - ' mxpv /podsync:{{ .Tag }}'
25- - ' mxpv /podsync:v{{ .Major }}.{{ .Minor }}'
26- - ' mxpv /podsync:latest'
27- - ' ghcr.io/mxpv /podsync:{{ .Tag }}'
28- - ' ghcr.io/mxpv /podsync:latest'
24+ - " {{ .Env.DOCKERHUB_USER }} /podsync:{{ .Tag }}"
25+ - " {{ .Env.DOCKERHUB_USER }} /podsync:v{{ .Major }}.{{ .Minor }}"
26+ - " {{ .Env.DOCKERHUB_USER }} /podsync:latest"
27+ - " ghcr.io/{{ .Env.GHCR_USER }} /podsync:{{ .Tag }}"
28+ - " ghcr.io/{{ .Env.GHCR_USER }} /podsync:latest"
2929
3030archives :
3131 - replacements :
You can’t perform that action at this time.
0 commit comments