add scheduled workflow for weekly image build #6
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: 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-lastest-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-lastest-release | |
secrets: inherit | |
with: | |
build-version: ${{ needs.get-latest-release.outputs.tag }} | |
tags: "${{ needs.get-latest-release.outputs.tag }}-weekly" |