Skip to content

Commit 7f3d285

Browse files
committed
ci: update workflows
1 parent f5b8fdb commit 7f3d285

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/default-next-meetup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
git add -A
4242
git commit -m "chore: reset next meetup to default"
4343
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
44-
gh workflow run deploy.yml --ref "${GITHUB_REF_NAME}"
44+
gh workflow run deploy.yml --ref "${GITHUB_REF_NAME}" -f sha="$(git rev-parse HEAD)"
4545
else
4646
echo "No changes to commit"
4747
fi

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- main
77
workflow_dispatch:
8+
inputs:
9+
sha:
10+
description: 'Commit SHA to deploy (defaults to branch tip)'
11+
required: false
12+
type: string
813

914
permissions:
1015
contents: write
@@ -20,6 +25,7 @@ jobs:
2025
- name: Checkout
2126
uses: actions/checkout@v4
2227
with:
28+
ref: ${{ inputs.sha || github.sha }}
2329
persist-credentials: false
2430

2531
- name: Setup Node.js

.github/workflows/set-next-meetup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
git add -A
5050
git commit -m "chore: set next meetup event"
5151
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
52-
gh workflow run deploy.yml --ref "${GITHUB_REF_NAME}"
52+
gh workflow run deploy.yml --ref "${GITHUB_REF_NAME}" -f sha="$(git rev-parse HEAD)"
5353
else
5454
echo "No changes to commit"
5555
fi

0 commit comments

Comments
 (0)