mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Use Env Vars to build and push Docker Images, bump golangci-lint to v1.50.1
This commit is contained in:
@@ -53,7 +53,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.43.0
|
||||
version: v1.50.1
|
||||
|
||||
- name: Go mod
|
||||
env:
|
||||
|
||||
@@ -31,6 +31,10 @@ jobs:
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Prepare Env Vars
|
||||
run: |
|
||||
echo GHCR_USER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||
|
||||
# Publish a new release from git tag.
|
||||
- uses: goreleaser/[email protected]
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
@@ -38,13 +42,17 @@ jobs:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
DOCKERHUB_USER: ${{ secrets.DOCKER_LOGIN }}
|
||||
GHCR_USER: ${{ env.GHCR_USER }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Publish nightly build.
|
||||
- uses: goreleaser/[email protected]
|
||||
if: github.event_name == 'schedule'
|
||||
if: ${{ github.repository_owner == 'mxpv' && github.event_name == 'schedule' }}
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist --nightly
|
||||
env:
|
||||
DOCKERHUB_USER: ${{ secrets.DOCKER_LOGIN }}
|
||||
GHCR_USER: ${{ env.GHCR_USER }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
+5
-5
@@ -21,11 +21,11 @@ builds:
|
||||
|
||||
dockers:
|
||||
- image_templates:
|
||||
- 'mxpv/podsync:{{ .Tag }}'
|
||||
- 'mxpv/podsync:v{{ .Major }}.{{ .Minor }}'
|
||||
- 'mxpv/podsync:latest'
|
||||
- 'ghcr.io/mxpv/podsync:{{ .Tag }}'
|
||||
- 'ghcr.io/mxpv/podsync:latest'
|
||||
- "{{ .Env.DOCKERHUB_USER }}/podsync:{{ .Tag }}"
|
||||
- "{{ .Env.DOCKERHUB_USER }}/podsync:v{{ .Major }}.{{ .Minor }}"
|
||||
- "{{ .Env.DOCKERHUB_USER }}/podsync:latest"
|
||||
- "ghcr.io/{{ .Env.GHCR_USER }}/podsync:{{ .Tag }}"
|
||||
- "ghcr.io/{{ .Env.GHCR_USER }}/podsync:latest"
|
||||
|
||||
archives:
|
||||
- replacements:
|
||||
|
||||
Reference in New Issue
Block a user