Auto-generate and upload routes #5137
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: Auto-generate and upload routes | |
on: | |
schedule: | |
- cron: "0 */2 * * *" # Run every 2 hour at UTC | |
watch: | |
types: [started] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Build nchnroutes | |
env: | |
PASS_IPS: ${{secrets.PASS_IPS}} | |
run: | | |
make | |
- name: upload to release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: latest | |
files: | | |
./routes4.conf | |
./routes6.conf | |
del_runs: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
with: | |
token: ${{ github.token }} | |
repository: ${{ github.repository }} | |
retain_days: 1 | |
keep_minimum_runs: 6 |