Daily Linode Cleanup #1523
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: Daily Linode Cleanup | |
on: | |
schedule: | |
# runs every 8 hours | |
- cron: "0 */8 * * *" | |
workflow_dispatch: | |
jobs: | |
job-name: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 # It's better to use a specific version than master | |
- name: Install the Linode CLI | |
uses: linode/action-linode-cli@v1 | |
with: | |
token: ${{ secrets.LINODE_CLI_TOKEN }} | |
# You can specify a version if needed, otherwise, it will use the latest. | |
# version: 5.35.0 | |
# setup-python: true # This is the default value. | |
# upgrade: true # This is the default value. | |
- name: List Linodes to Delete | |
run: linode-cli linodes list --tags ${{ secrets.DELETE_TAG }} --text | awk '(NR>1)' | awk '{print $1}' > linode-ids-delete.txt | |
- name: Delete Linodes | |
run: ./delete.sh |