Skip to content

Commit

Permalink
chore: add wf docker login test
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Korolev <[email protected]>
  • Loading branch information
universal-itengineer committed Dec 17, 2024
1 parent 31219cf commit 03f2f94
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test-matrix-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Login to Docker Registries

on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
push:
branches:
- main

defaults:
run:
shell: bash

jobs:
docker-login:
runs-on: ubuntu-latest
strategy:
matrix:
registry-data:
- registry: docker.io
username: DOCKER_USERNAME_1
password: DOCKER_PASSWORD_1
- registry: ghcr.io
username: GHCR_USERNAME
password: GHCR_PASSWORD
- registry: my-private-registry.com
username: PRIVATE_REGISTRY_USERNAME
password: PRIVATE_REGISTRY_PASSWORD

steps:
- name: Log in to Docker registry
run: |
echo "${{ matrix.registry-data.password }} | docker login ${{ matrix.registry-data.registry }} \
--username ${{ matrix.registry-data.username }} --password-stdin"

0 comments on commit 03f2f94

Please sign in to comment.