-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.3 KB
/
prepare-revert-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Prepare Revert PR
on:
workflow_dispatch:
inputs:
commitHash:
required: true
type: string
default: HEAD
description: |
The commit hash that you want to restore the library to, i.e. the last known working commit.
All subsequent commits will be reverted in the generated PR.
jobs:
prepare_revert_pr:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_AMPLIFY_WRITE }}
# mapping the inputs to these environment variables allows the @actions/core toolkit to pick up the inputs
INPUT_COMMITHASH: ${{ inputs.commitHash }}
steps:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
token: ${{ secrets.GH_TOKEN_AMPLIFY_WRITE }}
# fetch full history so that we can properly lookup past releases
fetch-depth: 0
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
with:
is-prebuild: true
- name: Generate Revert PR
working-directory: ./amplify-api-next
run: npx tsx ./scripts/prepare-revert-pr.ts