add release process
This commit is contained in:
+65
-30
@@ -9,20 +9,45 @@ on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
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.group1 }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- 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:
|
||||
text: ${{ steps.grep-image-content.outputs.image }}
|
||||
regex: "jekyll-build-pages:(.*)'"
|
||||
|
||||
test-simple:
|
||||
needs: resolve-image-tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_NAME: simple
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Render Action Metadata
|
||||
run: |
|
||||
./bin/render_action_metadata Dockerfile > action.yml
|
||||
|
||||
- name: Build local docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: ${{ needs.resolve-image-tag.outputs.tag }}
|
||||
- name: Test ${{ env.TEST_NAME }} Project
|
||||
uses: ./
|
||||
with:
|
||||
@@ -37,17 +62,19 @@ jobs:
|
||||
path: ./test_projects/${{ env.TEST_NAME }}
|
||||
|
||||
test-readme:
|
||||
needs: resolve-image-tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_NAME: readme
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Render Action Metadata
|
||||
run: |
|
||||
./bin/render_action_metadata Dockerfile > action.yml
|
||||
|
||||
- name: Build local docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: ${{ needs.resolve-image-tag.outputs.tag }}
|
||||
- name: Test ${{ env.TEST_NAME }} Project
|
||||
uses: ./
|
||||
with:
|
||||
@@ -62,17 +89,19 @@ jobs:
|
||||
path: ./test_projects/${{ env.TEST_NAME }}
|
||||
|
||||
test-octicons:
|
||||
needs: resolve-image-tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_NAME: octicons
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Render Action Metadata
|
||||
run: |
|
||||
./bin/render_action_metadata Dockerfile > action.yml
|
||||
|
||||
- name: Build local docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: ${{ needs.resolve-image-tag.outputs.tag }}
|
||||
- name: Test ${{ env.TEST_NAME }} Project
|
||||
uses: ./
|
||||
with:
|
||||
@@ -87,17 +116,19 @@ jobs:
|
||||
path: ./test_projects/${{ env.TEST_NAME }}
|
||||
|
||||
test-mojombo:
|
||||
needs: resolve-image-tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_NAME: mojombo
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Render Action Metadata
|
||||
run: |
|
||||
./bin/render_action_metadata Dockerfile > action.yml
|
||||
|
||||
- name: Build local docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: ${{ needs.resolve-image-tag.outputs.tag }}
|
||||
- name: Test ${{ env.TEST_NAME }} Project
|
||||
uses: ./
|
||||
with:
|
||||
@@ -112,17 +143,19 @@ jobs:
|
||||
path: ./test_projects/${{ env.TEST_NAME }}
|
||||
|
||||
test-themes:
|
||||
needs: resolve-image-tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_NAME: themes
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Render Action Metadata
|
||||
run: |
|
||||
./bin/render_action_metadata Dockerfile > action.yml
|
||||
|
||||
- name: Build local docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: ${{ needs.resolve-image-tag.outputs.tag }}
|
||||
- name: Test ${{ env.TEST_NAME }} Project
|
||||
uses: ./
|
||||
with:
|
||||
@@ -137,17 +170,19 @@ jobs:
|
||||
path: ./test_projects/${{ env.TEST_NAME }}
|
||||
|
||||
test-jekyll-include-cache:
|
||||
needs: resolve-image-tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEST_NAME: jekyll-include-cache
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Render Action Metadata
|
||||
run: |
|
||||
./bin/render_action_metadata Dockerfile > action.yml
|
||||
|
||||
- name: Build local docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: ${{ needs.resolve-image-tag.outputs.tag }}
|
||||
- name: Test ${{ env.TEST_NAME }} Project
|
||||
uses: ./
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user