From a9c6a12182e659a43b020b5e5daec0c85f064346 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 14 Aug 2022 17:36:58 +0200 Subject: [PATCH] Migrated docker build to a reusable workflow --- .github/workflows/docker-image-build.yml | 29 ++++-------------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/docker-image-build.yml b/.github/workflows/docker-image-build.yml index 63020514..21e51ff4 100644 --- a/.github/workflows/docker-image-build.yml +++ b/.github/workflows/docker-image-build.yml @@ -1,4 +1,4 @@ -name: Build docker image +name: Build and publish docker image on: push: @@ -9,26 +9,7 @@ on: jobs: build: - runs-on: ubuntu-22.04 - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - version: latest - - name: Login to docker hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Login to GitHub container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GHCR_PAT }} - - name: Build and push the image - run: bash ./docker/build + uses: shlinkio/github-actions/.github/workflows/docker-build-and-publish.yml@main + secrets: inherit + with: + build-and-publish-script: bash ./docker/build