mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-08 20:21:12 -06:00
committed by
GitHub
parent
0fecb8e252
commit
d0f71d9b0e
14
.github/workflows/test-book-website-pull-request.yml
vendored
Normal file
14
.github/workflows/test-book-website-pull-request.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: Test building book and website with custom image
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-image:
|
||||||
|
uses: ./.github/workflows/docker-build-push.yml
|
||||||
|
|
||||||
|
test-building-book-website:
|
||||||
|
needs: build-and-push-image
|
||||||
|
uses: ./.github/workflows/test-book-website.yml
|
||||||
|
with:
|
||||||
|
docker-image: ghcr.io/${{ github.repository }}:${{ github.event.pull_request.head.ref }}
|
||||||
14
.github/workflows/test-book-website-push.yml
vendored
Normal file
14
.github/workflows/test-book-website-push.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: Test building book and website with default image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-image:
|
||||||
|
uses: ./.github/workflows/docker-build-push.yml
|
||||||
|
|
||||||
|
test-building-book-website:
|
||||||
|
needs: build-and-push-image
|
||||||
|
uses: ./.github/workflows/test-book-website.yml
|
||||||
|
with:
|
||||||
|
docker-image: ghcr.io/${{ github.repository }}:latest
|
||||||
25
.github/workflows/test-book-website.yml
vendored
25
.github/workflows/test-book-website.yml
vendored
@@ -1,17 +1,14 @@
|
|||||||
name: Test building book and website
|
name: Test book and website for given image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
env:
|
docker-image:
|
||||||
IMAGE: ghcr.io/${{ github.repository }}:${{ github.event.pull_request.head.ref }}
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
test-book-website:
|
||||||
uses: ./.github/workflows/docker-build-push.yml
|
|
||||||
|
|
||||||
test-building-book-website:
|
|
||||||
needs: build-and-push-image
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
@@ -19,7 +16,7 @@ jobs:
|
|||||||
- name: Print dependency versions
|
- name: Print dependency versions
|
||||||
uses: addnab/docker-run-action@v3
|
uses: addnab/docker-run-action@v3
|
||||||
with:
|
with:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${{ inputs.docker-image }}
|
||||||
options: -v ${{ github.workspace }}:/app
|
options: -v ${{ github.workspace }}:/app
|
||||||
run: |
|
run: |
|
||||||
cd /app/book
|
cd /app/book
|
||||||
@@ -27,7 +24,7 @@ jobs:
|
|||||||
- name: Print build variables
|
- name: Print build variables
|
||||||
uses: addnab/docker-run-action@v3
|
uses: addnab/docker-run-action@v3
|
||||||
with:
|
with:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${{ inputs.docker-image }}
|
||||||
options: -v ${{ github.workspace }}:/app
|
options: -v ${{ github.workspace }}:/app
|
||||||
run: |
|
run: |
|
||||||
cd /app/book
|
cd /app/book
|
||||||
@@ -35,7 +32,7 @@ jobs:
|
|||||||
- name: Test baking the release versions
|
- name: Test baking the release versions
|
||||||
uses: addnab/docker-run-action@v3
|
uses: addnab/docker-run-action@v3
|
||||||
with:
|
with:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${{ inputs.docker-image }}
|
||||||
options: -v ${{ github.workspace }}:/app
|
options: -v ${{ github.workspace }}:/app
|
||||||
run: |
|
run: |
|
||||||
cd /app/book
|
cd /app/book
|
||||||
@@ -51,7 +48,7 @@ jobs:
|
|||||||
- name: Test building website
|
- name: Test building website
|
||||||
uses: addnab/docker-run-action@v3
|
uses: addnab/docker-run-action@v3
|
||||||
with:
|
with:
|
||||||
image: ${{ env.IMAGE }}
|
image: ${{ inputs.docker-image }}
|
||||||
options: -v ${{ github.workspace }}:/app
|
options: -v ${{ github.workspace }}:/app
|
||||||
run: |
|
run: |
|
||||||
cd /app/book
|
cd /app/book
|
||||||
|
|||||||
Reference in New Issue
Block a user