Skip to content

Commit a73addb

Browse files
committed
see if we can trick peter-evans
1 parent 47bf1ff commit a73addb

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/cleanup.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#
2+
# __ __
3+
# / /____ ___ ____ ___ ___ _/ / This file is provided to you by https://github.com/tegonal/github-commons
4+
# / __/ -_) _ `/ _ \/ _ \/ _ `/ / Copyright 2022 Tegonal Genossenschaft <[email protected]>
5+
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal
6+
# /___/ Please report bugs and contribute back your improvements
7+
#
8+
# Version: v2.6.0
9+
###################################
10+
name: Cleanup
11+
12+
on:
13+
push:
14+
branches:
15+
- test
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
ssh-key: ${{ secrets.AUTO_PR_DEPLOY_KEY }}
24+
- name: Cleanup Sources
25+
run: echo "hello world" > dummy.txt
26+
# - name: setup ssh
27+
# run: |
28+
# if [[ -z $SSH_AUTH_SOCK ]]
29+
# then
30+
# echo "Starting agent."
31+
# LOCAL_SSH_AUTH_SOCK="$(mktemp -t ssh-agent-XXXXXXXXXX).sock"
32+
# echo "SSH_AUTH_SOCK=${LOCAL_SSH_AUTH_SOCK}" >> $GITHUB_ENV
33+
# ssh-agent -a "$LOCAL_SSH_AUTH_SOCK" > /dev/null
34+
# else
35+
# echo "Agent is already running."
36+
# fi
37+
# - name: add deploy key
38+
# run: |
39+
# echo "Adding private key."
40+
# ssh-add - <<< "${{ secrets.AUTO_PR_DEPLOY_KEY }}"
41+
# cat .git/config
42+
# perl -0777 -i -pe "s@url = (.*)@url = ssh://\${1}@;" .git/config
43+
# cat .git/config
44+
45+
- name: Create Pull Request if necessary
46+
uses: peter-evans/create-pull-request@v6
47+
with:
48+
branch: auto-cleanup
49+
title: Auto Cleanup
50+
commit-message: auto cleanup sources
51+
body: Looks like someone forgot to run ./scripts/cleanup-on-push-to-main.sh before committing. I did it for them :)
52+
delete-branch: true
53+
push-to-fork: ${{ vars.AUTO_PR_FORK_NAME != '' && vars.AUTO_PR_FORK_NAME || secrets.AUTO_PR_FORK_NAME }}

0 commit comments

Comments
 (0)