Skip to content

Commit

Permalink
fix: Checkout proper codebase and bump some deps (#7437)
Browse files Browse the repository at this point in the history
  • Loading branch information
toninis authored Oct 2, 2024
1 parent 0fbdc34 commit 63b25d3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/preview-env-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,61 @@ on:
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
5 changes: 3 additions & 2 deletions .github/workflows/preview-env-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
submodules: true
fetch-depth: 0
ref: ${{ inputs.COMMIT_SHA }}

- name: Setup Python
uses: actions/setup-python@db9987b4c1f10f0404fa60ee629f675fafbd6763 # v4.6.0
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.9"

Expand Down

0 comments on commit 63b25d3

Please sign in to comment.