Bump github.com/docker/distribution from 2.7.1+incompatible to 2.8.2+incompatible #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
build-and-scan: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.16' | |
- uses: actions/cache@v2.1.4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- run: | | |
go test ./... | |
env: | |
CGO_ENABLED: 0 | |
- | |
name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
run: | | |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin | |
echo "${GITHUB_TOKEN}" | docker login ghcr.io --username $GITHUB_ACTOR --password-stdin | |
- | |
name: Run GoReleaser | |
if: success() && startsWith(github.ref, 'refs/tags/v') | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
version: latest | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
- | |
name: Clear | |
if: always() && startsWith(github.ref, 'refs/tags/v') | |
run: | | |
rm -f ${HOME}/.docker/config.json |