Skip to content

add scheduled workflow for weekly image build #10

add scheduled workflow for weekly image build

add scheduled workflow for weekly image build #10

name: Weekly Image Build of last Release
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
on:
# schedule:
# - cron: "5 0 * * 1" # At 00:05 on Monday
pull_request: # just for debugging
types: [opened, synchronize]
jobs:
get-latest-release:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
steps:
- name: Get latest tag
id: get-tag
run: |
echo "tag=$(curl -s -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' 'https://api.github.com/repos/fkie-cad/Logprep/tags' | jq '.[0].name' | tr -d 'v\"')" >> "$GITHUB_OUTPUT"
- name: debug tag
run: echo ${{ steps.get-tag.outputs.tag }}
containerbuild:
uses: ./.github/workflows/container-build.yml
needs: get-latest-release
secrets: inherit
with:
build-version: ${{ needs.get-latest-release.outputs.tag }}
tags: "${{ needs.get-latest-release.outputs.tag }}-weekly"