AxoSyslog stable #3
Workflow file for this run
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
# Please note that the AxoSyslog git repository is not available in this workflow. | |
# It means that certain convenience/helper functions are not available (e.g. gh_output). | |
# This is intentional as AxoSyslog will be acquired from the tarball. | |
name: AxoSyslog stable | |
permissions: write-all | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'axosyslog-[0-9]+*' | |
jobs: | |
pre-check: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'axoflow' | |
steps: | |
- name: Validate tag | |
run: | | |
if [[ ! "${{ github.ref }}" =~ ^refs/tags/axosyslog-[0-9]+ ]]; then | |
echo "Please start the workflow on a 'axosyslog-[0-9]+*' tag" | |
false | |
fi | |
find-draft-release-run: | |
needs: pre-check | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
DRAFT_RELEASE_RUN_ID: ${{ steps.find-and-export-run-id.outputs.DRAFT_RELEASE_RUN_ID }} | |
steps: | |
- name: Find and export run-id | |
id: find-and-export-run-id | |
run: | | |
DRAFT_RELEASE_RUN_ID=$(gh run list \ | |
--repo "${{ github.repository_owner }}/axosyslog" \ | |
--workflow "Draft release" \ | |
--json "status,conclusion,updatedAt,databaseId" \ | |
--jq '[ .[] | select(.status=="completed") | select(.conclusion=="success") ] | max_by(.updatedAt) | .databaseId') | |
if [[ -z "${DRAFT_RELEASE_RUN_ID}" ]]; then | |
echo "Failed to find the run-id of the last successful 'Draft release' workflow run." | |
false | |
fi | |
echo "DRAFT_RELEASE_RUN_ID=${DRAFT_RELEASE_RUN_ID}" >> $GITHUB_OUTPUT | |
index-packages: | |
needs: find-draft-release-run | |
uses: ./.github/workflows/index-packages.yml | |
with: | |
pkg-type: stable | |
run-id: ${{ needs.find-draft-release-run.outputs.DRAFT_RELEASE_RUN_ID }} | |
secrets: | |
config-base64: ${{ secrets.PACKAGE_INDEXER_CONFIG_BASE64 }} | |
gpg-key-base64: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_BASE64 }} | |
gpg-key-passphrase: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_PASSPHRASE }} | |
test-packages: | |
needs: index-packages | |
uses: ./.github/workflows/test-apt-packages.yml | |
with: | |
pkg-type: stable | |
publish-image: | |
uses: ./.github/workflows/axosyslog-docker.yml | |
needs: find-draft-release-run | |
with: | |
type: stable |