forked from actions/jekyll-build-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (61 loc) · 1.79 KB
/
record.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Record Expected
on:
workflow_dispatch:
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
resolve-image-tag:
runs-on: ubuntu-latest
outputs:
tag: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.regex-match.outputs.tag_match }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get action.yaml tag
id: regex-match
run: |
action=$(<action.yml)
regex="jekyll-v4-build-pages:(.*)'"
if [[ $action =~ $regex ]]
then
tag_match="${BASH_REMATCH[1]}"
echo "tag_match=$tag_match" >> $GITHUB_OUTPUT
fi
test-builds:
needs: resolve-image-tag
runs-on: ubuntu-latest
strategy:
matrix:
test:
- simple
- readme
- octicons
- mojombo
- themes
- jekyll-include-cache
- future-false
- future-true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build local docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
tags: ${{ needs.resolve-image-tag.outputs.tag }}
- name: Build ${{ matrix.test }} Project
uses: ./
with:
source: ./test_projects/${{ matrix.test }}
destination: ./test_projects/${{ matrix.test }}/_expected
build_revision: JEKYLL_BUILD_REVISION
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive ${{ matrix.test }} Project
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.test }}
path: ./test_projects/${{ matrix.test }}/_expected