mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
fix(ci): use official login action and switch to github secret for ghcr (#2210)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
3a45a9182e
commit
c91099c5f9
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@ -67,25 +67,27 @@ jobs:
|
|||||||
name: Diff
|
name: Diff
|
||||||
run: git diff
|
run: git diff
|
||||||
-
|
-
|
||||||
name: Docker Login
|
name: Login to Docker Hub
|
||||||
if: success() && startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
env:
|
uses: docker/login-action@v1
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
with:
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
run: |
|
-
|
||||||
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
|
name: Login to GitHub Container Registry
|
||||||
echo "${GITHUB_TOKEN}" | docker login ghcr.io --username $GITHUB_ACTOR --password-stdin
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Snapcraft Login
|
name: Snapcraft Login
|
||||||
if: success() && startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
env:
|
|
||||||
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
|
|
||||||
run: |
|
run: |
|
||||||
snapcraft login --with <(echo "$SNAPCRAFT_LOGIN")
|
snapcraft login --with <(echo "${{ secrets.SNAPCRAFT_LOGIN }}")
|
||||||
-
|
-
|
||||||
name: GoReleaser
|
name: GoReleaser
|
||||||
if: success()
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
||||||
run: |
|
run: |
|
||||||
@ -94,8 +96,3 @@ jobs:
|
|||||||
elif [[ $GITHUB_REF == refs/heads/master ]]; then
|
elif [[ $GITHUB_REF == refs/heads/master ]]; then
|
||||||
./goreleaser --snapshot
|
./goreleaser --snapshot
|
||||||
fi
|
fi
|
||||||
-
|
|
||||||
name: Clear
|
|
||||||
if: always() && startsWith(github.ref, 'refs/tags/v')
|
|
||||||
run: |
|
|
||||||
rm -f ${HOME}/.docker/config.json
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user