Skip to content

feature: add release fetcher and dispatcher #17

feature: add release fetcher and dispatcher

feature: add release fetcher and dispatcher #17

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.yaml

Check failure on line 49 in .github/workflows/get-latest-releases.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/get-latest-releases.yml

Invalid workflow file

error parsing called workflow ".github/workflows/get-latest-releases.yml" -> "./.github/workflows/falco.yaml" : failed to fetch workflow: workflow was not found.
if: ${{ needs.check-updates.outputs.is-falco-updated }} == 'true'
secrets: inherit
with:
image_tag: ${{ var.FALCO_VERSION }} # need to check if it gets the updated value
# permissions:
# packages: write
# contents: read