File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Delete serverless directory in backports
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - ' 7.*'
7+ - ' 8.*'
8+
9+ jobs :
10+ check-and-delete-serverless :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+
17+ - name : Check for existence of docs/serverless directory
18+ id : check_serverless
19+ run : |
20+ if [ -d "docs/serverless" ]; then
21+ echo "SERVERLESS_EXISTS=true" >> $GITHUB_ENV
22+ else
23+ echo "SERVERLESS_EXISTS=false" >> $GITHUB_ENV
24+ fi
25+ - name : Delete docs/serverless directory if it exists
26+ if : env.SERVERLESS_EXISTS == 'true'
27+ run : |
28+ rm -rf docs/serverless
29+ git config pull.rebase true
30+ git config --global user.name 'github-actions[bot]'
31+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
32+ git add .
33+ git commit -m "Delete docs/serverless directory and its contents"
34+ git pull origin ${{ github.head_ref }}
35+ git push origin HEAD:${{ github.head_ref }}
You can’t perform that action at this time.
0 commit comments