-
-
Notifications
You must be signed in to change notification settings - Fork 63
48 lines (40 loc) · 1.38 KB
/
archive-feature.yaml
File metadata and controls
48 lines (40 loc) · 1.38 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Archive Feature
on:
workflow_dispatch:
inputs:
feature_name:
description: 'Name of the feature to archive'
required: true
type: string
jobs:
archive:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.ARCHIVE_TOKEN }}
- name: Install just
uses: extractions/setup-just@v3
- name: Create branch for archiving
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b archive/${{ inputs.feature_name }}
- name: Archive feature
run: just archive ${{ inputs.feature_name }}
- name: Commit changes
run: |
git add -A
git commit -m "chore: archive feature ${{ inputs.feature_name }}"
- name: Push changes
run: git push origin archive/${{ inputs.feature_name }}
- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.ARCHIVE_TOKEN }}
run: |
gh pr create \
--title "Archive feature: ${{ inputs.feature_name }}" \
--body "This PR archives the \`${{ inputs.feature_name }}\` feature by moving it to the archive directory." \
--base main \
--head archive/${{ inputs.feature_name }}