Skip to content

Commit

Permalink
Use docker/login-action instead of command-line for ghcr too
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Feb 6, 2024
1 parent 5e98d7a commit 052c7a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build_multiarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_ACCESS_TOKEN }}

- run: |
if [ "${{ env.dev_suffix }}" = "-dev" ]; then
echo "target=development" >> $GITHUB_ENV
Expand Down Expand Up @@ -99,7 +105,6 @@ jobs:
- name: Push docker image to ghcr.io/ruby
if: "${{ env.push_tags }}"
run: |-
echo $GHCR_ACCESS_TOKEN | docker login ghcr.io -u $GHCR_USER --password-stdin
push_tags="${{ env.push_tags }}"
for tag in $push_tags; do
docker tag rubylang/ruby:$tag ghcr.io/ruby/ruby:$tag
Expand Down

0 comments on commit 052c7a6

Please sign in to comment.