Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hendricius committed Dec 8, 2023
1 parent dd3417f commit 0512726
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
6 changes: 1 addition & 5 deletions .github/workflows/validate-book-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0512726

Please sign in to comment.