From 4f81b65d336afe8c39d904ea1d3e48f55e24aad3 Mon Sep 17 00:00:00 2001 From: sando38 <90323876+sando38@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:12:16 +0200 Subject: [PATCH] actions: test login to DockerHub --- .github/workflows/registry-login-test.yml | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/registry-login-test.yml diff --git a/.github/workflows/registry-login-test.yml b/.github/workflows/registry-login-test.yml new file mode 100644 index 000000000..450d52c26 --- /dev/null +++ b/.github/workflows/registry-login-test.yml @@ -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 }}