Skip to content

Commit

Permalink
Add auto-cleaner "test" step
Browse files Browse the repository at this point in the history
  • Loading branch information
Soubinan committed Mar 23, 2024
1 parent d2cfcae commit 70d8d3f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/auto-cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
node-version: ${{env.NODE_VERSION}}

- name: Cleanup
if: github.event.action == 'closed' && github.event.pull_request.merged
run: |
cat << EOF > /tmp/rclone.conf
$RCLONE_CONFIG
Expand All @@ -49,3 +50,18 @@ jobs:
RCLONE_CONFIG: ${{secrets.RCLONE_CONFIG}}
RCLONE_CONFIG_PASS: ${{secrets.RCLONE_CONFIG_PASS}}
MAX_BUILDS: 1

- name: Cleanup Test
if: github.event.action != 'closed'
run: |
cat << EOF > /tmp/rclone.conf
$RCLONE_CONFIG
EOF
echo
node ${{github.workspace}}/.github/auto-cleaner.js
env:
API_TOKEN: ${{secrets.HOMELAB_LXC_TOKEN}}
API_ENDPOINT: ${{secrets.HOMELAB_LXC_EP}}
RCLONE_CONFIG: ${{secrets.RCLONE_CONFIG}}
RCLONE_CONFIG_PASS: ${{secrets.RCLONE_CONFIG_PASS}}
MAX_BUILDS: 10

0 comments on commit 70d8d3f

Please sign in to comment.