Add support for login to a registry
authorWilliam Desportes <redacted>
Tue, 17 Aug 2021 12:25:13 +0000 (14:25 +0200)
committerWilliam Desportes <redacted>
Wed, 15 Sep 2021 21:18:54 +0000 (23:18 +0200)
.github/workflows/build.yml

index b3493d82b9eef27cabb97f5bba0a6b96fb468c30..563d04b8ca6a159fee45a2532ecee6195c2660db 100644 (file)
@@ -13,5 +13,14 @@ jobs:
     steps:
       - name: Checkout repository
         uses: actions/checkout@v2
+      - name: Get docker hub username
+        id: creds
+        run: echo '::set-output name=username::${{ secrets.DOCKER_PULL_USERNAME }}'
+      - name: Login to Docker Hub
+        if: steps.creds.outputs.username != ''
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKER_PULL_USERNAME }}
+          password: ${{ secrets.DOCKER_PULL_PASSWORD }}
       - name: Build image variant "${{ matrix.variants }}"
         run: cd ${{ matrix.variants }} && docker build ./
git clone https://git.99rst.org/PROJECT