]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ci: improve CI for containers
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Sun, 4 Sep 2022 23:10:11 +0000 (23:10 +0000)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 29 Sep 2022 05:13:13 +0000 (05:13 +0000)
Login to GitHub Container Registry as the actor instead
of the repository owner.

Upgrade to login-action@v2 and build-push-action@v3 Github Actions.

.github/workflows/container.yml

index 03c9c5ec273ef4a86ca2a69f94b7d1c8caa95b45..7b96a027095e25b571b898aa478d31ac71791a66 100644 (file)
@@ -37,17 +37,17 @@ jobs:
                 uses: actions/checkout@v2
             -   name: Set up Docker Buildx
                 uses: docker/setup-buildx-action@v1
-#                with:
-#                    buildkitd-flags: --debug
             -   name: Login to GitHub Container Registry
-                uses: docker/login-action@v1
+                uses: docker/login-action@v2
                 with:
                     registry: ghcr.io
-                    username: ${{ github.repository_owner }}
+                    username: ${{ github.actor }}
                     password: ${{ secrets.GITHUB_TOKEN }}
+            -   name: Set up env.actor
+                run: echo "actor=${GITHUB_ACTOR,,}" >>${GITHUB_ENV}
             -   name: Build and Push Container
-                uses: docker/build-push-action@v2
+                uses: docker/build-push-action@v3
                 with:
                     file: test/container/${{ matrix.config.dockerfile }}
-                    tags: ghcr.io/dracutdevs/${{ matrix.config.tag }}
+                    tags: ghcr.io/${{env.actor}}/${{ matrix.config.tag }}
                     push: ${{ github.event_name == 'push' ||  github.event_name == 'schedule' }}