Skip to content

Commit

Permalink
Use var for image name
Browse files Browse the repository at this point in the history
  • Loading branch information
hendricius committed Dec 7, 2023
1 parent bab8b6c commit a0850a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags:
# Latest for main, else branch name
type=raw,value=${{ github.ref}},enable=${{ github.ref != format('refs/heads/{0}', 'main') }}
type=raw,value=${{ github.ref}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}

- name: Build and push Docker image
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/validate-book-build.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
name: Validate LaTeX Document
on:
push:
branches:
- '**' # All branches
- '!main' # But main as will do it anyway and more in release_book
pull_request:

jobs:
test_building_book:
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/hendricius/the-sourdough-framework:${{ github.ref_slug }}
steps:
- name: Set up git repository
uses: actions/checkout@v3
- name: Build and Push Docker Image
uses: ./.github/workflows/docker_build_push.yml
- name: Print dependency versions
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/hendricius/the-sourdough-framework:latest
image: ${{ ENV.IMAGE }}
options: -v ${{ github.workspace }}:/app
run: |
cd /app/book
make show_tools_version
- name: Print build variables
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/hendricius/the-sourdough-framework:latest
image: ${{ ENV.IMAGE }}
options: -v ${{ github.workspace }}:/app
run: |
cd /app/book
make printvars
- name: Test baking the release versions
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/hendricius/the-sourdough-framework:latest
image: ${{ ENV.IMAGE }}
options: -v ${{ github.workspace }}:/app
run: |
cd /app/book
make -j build_serif_pdf build_ebook
- name: Test building website
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/hendricius/the-sourdough-framework:latest
image: ${{ ENV.IMAGE }}
options: -v ${{ github.workspace }}:/app
run: |
cd /app/book
Expand Down

0 comments on commit a0850a4

Please sign in to comment.