Skip to content

feature: add release fetcher and dispatcher #26

feature: add release fetcher and dispatcher

feature: add release fetcher and dispatcher #26

name: Get and Update Latest Releases
on:
schedule:
- cron: '0 0 * * 0'
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: false
jobs:
get-latest-version:
runs-on: ubuntu-latest
# outputs:
# is-falco-updated: ${{ steps.check-updates.outputs.FALCO }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.22.3'
- name: update the variables
env:
GH_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
working-directory: scripts
run: |
go run repo-variable-writer.go
# - name: Dispatch
# id: check-updates
# env:
# file: /tmp/updates.json # generated by go program
# run: |
# if jq -e --arg val "falco" '.proj_names | index($val) != null' "$file" > /dev/null; then
# echo "Element '$value' found in the proj_names array."
# echo "FALCO=true" >> $GITHUB_OUTPUT
# else
# echo "Element 'falco' not found in the proj_names array."
# echo "FALCO=false" >> $GITHUB_OUTPUT
# fi
# falco-proj:
# uses: .github/workflows/falco.yml
# needs: ["get-latest-version"]
# if: ${{ needs.check-updates.outputs.is-falco-updated }} == 'true'
# secrets: inherit
# with:
# version: ${{ vars.FALCO_VERSION }} # need to check if it gets the updated value