Skip to content

Commit

Permalink
fix docker login in release job
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingping Hou committed Jun 8, 2021
1 parent 1835288 commit 390ede3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
needs: test
steps:

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: scribdbot
password: ${{ secrets.SCRIBDBOT_GH_CONTAINER_REGISTRY_TOKEN }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

Expand All @@ -61,6 +68,5 @@ jobs:
- name: Build and publish docker image
run: |
VERSION=${GITHUB_REF##*/}
echo ${SCRIBDBOT_GH_CONTAINER_REGISTRY_TOKEN} | docker login ghcr.io -u scribdbot --password-stdin
docker build --rm -t "ghcr.io/scribd/objinsync:${VERSION}" .
docker push "ghcr.io/scribd/objinsync:${VERSION}"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16.3 as build
FROM golang:1.16.5 as build
LABEL org.opencontainers.image.source https://github.com/scribd/objinsync
ADD . /app
WORKDIR /app
Expand Down

0 comments on commit 390ede3

Please sign in to comment.