From 74f303d2b69025b9071f7651291889c73996ff62 Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Thu, 1 Dec 2022 15:16:42 -0300 Subject: [PATCH 1/2] Remove publish-docker-latest and publish-docker-tag actions --- .github/workflows/publish-docker-latest.yml | 18 ------------------ .github/workflows/publish-docker-tag.yml | 19 ------------------- 2 files changed, 37 deletions(-) delete mode 100644 .github/workflows/publish-docker-latest.yml delete mode 100644 .github/workflows/publish-docker-tag.yml diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml deleted file mode 100644 index 2ff70fa..0000000 --- a/.github/workflows/publish-docker-latest.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Publish latest image to DockerHub - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: getmeili/docs-scraper - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml deleted file mode 100644 index 79cc40f..0000000 --- a/.github/workflows/publish-docker-tag.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Publish tagged image to DockerHub - -on: - push: - tags: - - 'v*' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: getmeili/docs-scraper - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - tag_names: true From b0604f3d58f98b440c0190614504ab3007241444 Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Thu, 1 Dec 2022 15:17:43 -0300 Subject: [PATCH 2/2] Create a new Github Action to publish multi-arch images to DockerHub --- .github/workflows/publish-docker-image.yml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish-docker-image.yml diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml new file mode 100644 index 0000000..a4e2a5d --- /dev/null +++ b/.github/workflows/publish-docker-image.yml @@ -0,0 +1,30 @@ +name: Publish image to DockerHub + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64 + tags: getmeili/docs-scraper:latest,getmeili/docs-scraper:${{ github.ref_name }}