From 837d22ace149733887df15a8a28b76dee5276d44 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Tue, 19 Apr 2022 15:49:32 -0700 Subject: [PATCH 1/2] Fix up record action --- .github/workflows/record.yml | 98 ++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/record.yml b/.github/workflows/record.yml index dd89303..9acb141 100644 --- a/.github/workflows/record.yml +++ b/.github/workflows/record.yml @@ -2,67 +2,67 @@ name: Record Expected on: workflow_dispatch: + pull_request: + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} jobs: - record-expected-output: + resolve-image-tag: runs-on: ubuntu-latest + outputs: + tag: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.regex-match.outputs.group1 }} steps: - name: Checkout repository uses: actions/checkout@v2 - - - name: Build test project 'simple' - uses: ./ - with: - source: test_projects/simple - destination: test_projects/simple/_expected - build_revision: JEKYLL_BUILD_REVISION - - - name: Build test project 'readme' - uses: ./ + - name: Grep action.yaml content + id: grep-image-content + run: | + image=$(grep -E "jekyll-build-pages.*\'" action.yml) + echo "::set-output name=image::$image" + - uses: actions-ecosystem/action-regex-match@v2 + id: regex-match with: - source: test_projects/readme - destination: test_projects/readme/_expected - build_revision: JEKYLL_BUILD_REVISION + text: ${{ steps.grep-image-content.outputs.image }} + regex: "jekyll-build-pages:(.*)'" - - name: Build test project 'octicons' - uses: ./ - with: - source: test_projects/octicons - destination: test_projects/octicons/_expected - build_revision: JEKYLL_BUILD_REVISION - - - name: Build test project 'mojombo' - uses: ./ - with: - source: test_projects/mojombo - destination: test_projects/mojombo/_expected - build_revision: JEKYLL_BUILD_REVISION - - - name: Build test project 'themes' - uses: ./ - with: - source: test_projects/themes - destination: test_projects/themes/_expected - build_revision: JEKYLL_BUILD_REVISION - - - name: Build test project 'jekyll-include-cache' - uses: ./ + 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@v2 + - name: Build local docker image + uses: docker/build-push-action@v2 with: - source: test_projects/jekyll-include-cache - destination: test_projects/jekyll-include-cache/_expected - build_revision: JEKYLL_BUILD_REVISION + context: . + file: Dockerfile + tags: ${{ needs.resolve-image-tag.outputs.tag }} - - name: Build test project 'future-false' + - name: Build ${{ matrix.test }} Project uses: ./ with: - source: test_projects/future-false - destination: test_projects/future-false/_expected + source: ./test_projects/${{ matrix.test }} + destination: ./test_projects/${{ matrix.test }}/_expected build_revision: JEKYLL_BUILD_REVISION + token: ${{ secrets.GITHUB_TOKEN }} - - name: Build test project 'future-true' - uses: ./ + - name: Archive ${{ matrix.test }} Project + uses: actions/upload-artifact@v3 with: - source: test_projects/future-true - destination: test_projects/future-true/_expected - build_revision: JEKYLL_BUILD_REVISION - + name: ${{ matrix.test }} + path: ./test_projects/${{ matrix.test }}/_expected From 0b99ed0c25cbe86c5695391c5eabe1721ab6c091 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Tue, 19 Apr 2022 15:53:00 -0700 Subject: [PATCH 2/2] Drop pr --- .github/workflows/record.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/record.yml b/.github/workflows/record.yml index 9acb141..07086a8 100644 --- a/.github/workflows/record.yml +++ b/.github/workflows/record.yml @@ -2,7 +2,6 @@ name: Record Expected on: workflow_dispatch: - pull_request: env: # Use docker.io for Docker Hub if empty