diff options
author | 2023-03-06 13:00:20 +0100 | |
---|---|---|
committer | 2023-03-06 13:00:20 +0100 | |
commit | 9af634069cf7c24667f6bd1f8cd63b2649db9faf (patch) | |
tree | e7a61802df3542dc080bb6c98e4ad27f2ba62e9a /.github | |
parent | call status_embed on CI completed (diff) |
call status_embed from main CI
This also passes the sha-tag as input
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/static-preview.yaml | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/.github/workflows/static-preview.yaml b/.github/workflows/static-preview.yaml index 9987aafe..c19ba05c 100644 --- a/.github/workflows/static-preview.yaml +++ b/.github/workflows/static-preview.yaml @@ -1,10 +1,12 @@ name: Build & Publish Static Preview on: - push: - branches: - - main - pull_request: + workflow_call: + inputs: + sha-tag: + description: "A short-form SHA tag for the commit that triggered this workflow" + required: true + type: string jobs: build: @@ -14,13 +16,6 @@ jobs: steps: - uses: actions/checkout@v3 - # Create a commit SHA-based tag for the container repositories - - name: Create SHA Container Tag - id: sha_tag - run: | - tag=$(cut -c 1-7 <<< $GITHUB_SHA) - echo "tag=$tag" >> $GITHUB_OUTPUT - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -43,7 +38,7 @@ jobs: cache-to: type=inline tags: | ghcr.io/python-discord/static-site:latest - ghcr.io/python-discord/static-site:${{ steps.sha_tag.outputs.tag }} + ghcr.io/python-discord/static-site:${{ inputs.sha_tag }} build-args: | git_sha=${{ github.sha }} STATIC_BUILD=TRUE @@ -53,7 +48,7 @@ jobs: run: | mkdir docker_build \ && docker run --entrypoint /bin/echo --name site \ - ghcr.io/python-discord/static-site:${{ steps.sha_tag.outputs.tag }} \ + ghcr.io/python-discord/static-site:${{ inputs.sha_tag }} \ && docker cp site:/app docker_build/ # Build directly to a local folder |