Skip to content

Commit

Permalink
actions: test login to DockerHub
Browse files Browse the repository at this point in the history
  • Loading branch information
sando38 committed Jul 17, 2023
1 parent eb0aaad commit 4f81b65
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/registry-login-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Test login to docker.io & ghcr.io'

on:
push:
branches:
- master

jobs:
login:
name: ${{ matrix.registry }} - login test
runs-on: ubuntu-latest
strategy:
matrix:
registry: [ghcr.io, docker.io]
fail-fast: false
steps:
-
name: Log in to ${{ matrix.registry }}
uses: docker/login-action@v2
with:
registry: ${{ matrix.registry }}
username: ${{ (matrix.registry == 'docker.io'
&& secrets.DOCKERHUB_USERNAME)
|| github.repository_owner }}
password: ${{ (matrix.registry == 'docker.io'
&& secrets.DOCKERHUB_TOKEN)
|| secrets.GITHUB_TOKEN }}

0 comments on commit 4f81b65

Please sign in to comment.