File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Archive Feature
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ feature_name :
7+ description : ' Name of the feature to archive'
8+ required : true
9+ type : string
10+
11+ permissions :
12+ contents : write
13+ pull-requests : write
14+
15+ jobs :
16+ archive :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v6
21+
22+ - name : Install just
23+ uses : extractions/setup-just@v3
24+
25+ - name : Create branch for archiving
26+ run : |
27+ git config user.name "github-actions[bot]"
28+ git config user.email "github-actions[bot]@users.noreply.github.com"
29+ git checkout -b archive/${{ inputs.feature_name }}
30+
31+ - name : Archive feature
32+ run : just archive ${{ inputs.feature_name }}
33+
34+ - name : Commit changes
35+ run : |
36+ git add -A
37+ git commit -m "chore: archive feature ${{ inputs.feature_name }}"
38+
39+ - name : Push changes
40+ run : git push origin archive/${{ inputs.feature_name }}
41+
42+ - name : Create Pull Request
43+ env :
44+ GH_TOKEN : ${{ github. token }}
45+ run : |
46+ gh pr create \
47+ --title "Archive feature: ${{ inputs.feature_name }}" \
48+ --body "This PR archives the \`${{ inputs.feature_name }}\` feature by moving it to the archive directory." \
49+ --base main \
50+ --head archive/${{ inputs.feature_name }}
You can’t perform that action at this time.
0 commit comments