From 05127260d6e7256356811cd60788fb39b78653e2 Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Fri, 8 Dec 2023 14:06:20 +0100 Subject: [PATCH] update --- .github/workflows/docker_build_push.yml | 15 +-------------- .github/workflows/validate-book-build.yml | 6 +----- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index d689c7b4..fc7b3586 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -2,10 +2,6 @@ name: Create and publish a Docker image on: workflow_call: - inputs: - image-tag: - required: true - type: string env: REGISTRY: ghcr.io @@ -29,18 +25,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw,value=${{ inputs.image-path }} - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - + tags: ${{ env.BRANCH == 'main' ? 'latest' : env.BRANCH }} diff --git a/.github/workflows/validate-book-build.yml b/.github/workflows/validate-book-build.yml index e08c511a..907e97e0 100644 --- a/.github/workflows/validate-book-build.yml +++ b/.github/workflows/validate-book-build.yml @@ -7,16 +7,12 @@ on: pull_request: env: - IMAGE_TAG: ${{ github.event.pull_request.head.ref }} IMAGE: ghcr.io/hendricius/the-sourdough-framework:${{ github.event.pull_request.head.ref }} -# For some reason I can't pass the environment here. jobs: build-and-push-image: uses: ./.github/workflows/docker_build_push.yml - with: - image-tag: ghcr.io/hendricius/the-sourdough-framework:${{ github.event.pull_request.head.ref }} - + test_building_book: runs-on: ubuntu-latest steps: