File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
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
+ - name : Cleanup Sources
23
+ run : echo "hello world" > dummy.txt
24
+ - name : Start ssh-agent
25
+ id : start_ssh_agent
26
+ run : |
27
+ if [[ -z $SSH_AUTH_SOCK ]]
28
+ then
29
+ echo "Starting agent."
30
+ LOCAL_SSH_AUTH_SOCK="$(mktemp -t ssh-agent-XXXXXXXXXX).sock"
31
+ echo "SSH_AUTH_SOCK=${LOCAL_SSH_AUTH_SOCK}" >> $GITHUB_ENV
32
+ ssh-agent -a "$LOCAL_SSH_AUTH_SOCK" > /dev/null
33
+ else
34
+ echo "Agent is already running."
35
+ fi
36
+
37
+ - name : " Add ssh key"
38
+ id : add_ssh_key
39
+ run : |
40
+ if [[ -n $PRIVATE_KEY ]]
41
+ then
42
+ echo "Adding private key."
43
+ ssh-add - <<< "${{ secrets.AUTO_PR_DEPLOY_KEY }}"
44
+ fi
45
+
46
+ - name : Create Pull Request if necessary
47
+ uses : peter-evans/create-pull-request@v6
48
+ with :
49
+ branch : auto-cleanup
50
+ title : Auto Cleanup
51
+ commit-message : auto cleanup sources
52
+ body : Looks like someone forgot to run ./scripts/cleanup-on-push-to-main.sh before committing. I did it for them :)
53
+ delete-branch : true
54
+ push-to-fork : ${{ vars.AUTO_PR_FORK_NAME != '' && vars.AUTO_PR_FORK_NAME || secrets.AUTO_PR_FORK_NAME }}
You can’t perform that action at this time.
0 commit comments