Equinix Metal Sweep #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Equinix Metal Sweep | |
on: | |
schedule: | |
- cron: '0 15 * * *' # before validation action | |
workflow_dispatch: | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
env: | |
ALLOW_SWEEP: ${{ secrets.ALLOW_SWEEP }} | |
steps: | |
- name: Check if sweep is allowed | |
id: check_sweep | |
run: | | |
if [ "$ALLOW_SWEEP" == "true" ]; then | |
echo "run_sweep=true" >> $GITHUB_OUTPUT | |
else | |
echo "run_sweep=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Equinix Metal Sweeper | |
if: steps.check_sweep.outputs.run_sweep == 'true' | |
uses: equinix-labs/[email protected] | |
with: | |
authToken: ${{ secrets.EQUINIX_API_TOKEN }} | |
projectID: ${{ secrets.EQUINIX_PROJECT_ID }} | |
keepProject: true |