From 5569aff385aaae48c5a5909f3973bd0a980af9da Mon Sep 17 00:00:00 2001 From: queeup Date: Sun, 7 Apr 2024 14:38:17 +0300 Subject: [PATCH] update github actions --- .../workflows/container_build_and_push.yml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/container_build_and_push.yml b/.github/workflows/container_build_and_push.yml index 745a847..8bfb6a5 100644 --- a/.github/workflows/container_build_and_push.yml +++ b/.github/workflows/container_build_and_push.yml @@ -20,17 +20,23 @@ jobs: runs-on: ubuntu-latest steps: + - name: Get repository basename + id: repo-basename + run: | + echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT + shell: bash + - name: Check out the repo uses: actions/checkout@v3 - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -38,27 +44,27 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | - ${{ secrets.DOCKER_HUB_USERNAME }}/subtitle-monitor + ${{ secrets.DOCKER_HUB_USERNAME }}/${{ steps.repo-basename.outputs.value }} ghcr.io/${{ github.repository }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: linux/amd64,linux/arm64,linux/arm/8,linux/arm/7,linux/arm/6 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Available platforms run: echo ${{ steps.buildx.outputs.platforms }} - name: Build and push id: docker_build - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: platforms: linux/amd64,linux/arm64,linux/arm/8,linux/arm/7,linux/arm/6 context: .