Skip to content

preview-env-fork-setup-update #6171

preview-env-fork-setup-update

preview-env-fork-setup-update #6171

name: preview-env-fork-setup-update
on:
workflow_dispatch:
inputs:
PR_NUMBER:
type: string
required: true
TRIGGERING_ACTOR:
type: string
required: true
COMMIT_SHA:
type: string
required: true
jobs:
update-initial-status:
runs-on: ubuntu-latest
steps:
- name: package/update-initial-status
uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: "preview-env-fork-setup-update / deploy"
description: "Pipeline for docs generation for ${{ inputs.COMMIT_SHA }} is running"
status: pending
deploy:
uses: ./.github/workflows/preview-env-template.yml
secrets: inherit
needs:
- update-initial-status
with:
PR_NUMBER: ${{ inputs.PR_NUMBER }}
TRIGGERING_ACTOR: ${{ inputs.TRIGGERING_ACTOR }}
COMMIT_SHA: ${{ inputs.COMMIT_SHA }}
# We need to duplicate here in order to set the proper commit status
# https://mattermost.atlassian.net/browse/CLD-5815
update-failure-final-status:
runs-on: ubuntu-latest
if: failure() || cancelled()
needs:
- deploy
steps:
- uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: "preview-env-fork-setup-update / deploy"
description: "Pipeline for docs generation for ${{ inputs.COMMIT_SHA }} failed~"
status: failure
# https://mattermost.atlassian.net/browse/CLD-5815
update-success-final-status:
runs-on: ubuntu-latest
if: success()
needs:
- deploy
steps:
- uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: "preview-env-fork-setup-update / deploy"
description: "Pipeline for docs generation for ${{ inputs.COMMIT_SHA }} succeeded"
status: success