Skip to content

Commit

Permalink
update docker login in action (#172)
Browse files Browse the repository at this point in the history
* update docker login in action

* add allowedlist.yaml
  • Loading branch information
tomoyamachi authored Feb 16, 2022
1 parent 081a52b commit a4295a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/containerscan/allowedlist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
general:
vulnerabilities:
# dockle does not use a target feature
- CVE-2021-43816
22 changes: 12 additions & 10 deletions .github/workflows/releasebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

jobs:
build-and-scan:
build-and-release:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
Expand All @@ -28,15 +28,17 @@ jobs:
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: Login to docker.io registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: goodwithtech
password: ${{ secrets.GH_PAT }}
-
name: Run GoReleaser
if: success() && startsWith(github.ref, 'refs/tags/v')
Expand Down

0 comments on commit a4295a7

Please sign in to comment.