debug job #1
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
name: 'Tag Repo' | |
on: | |
push: | |
paths: | |
- .github/workflows/tag_release.yml | |
workflow_call: | |
inputs: | |
repo_ref: | |
description: Which branch or tag | |
required: false | |
default: 'main' | |
type: 'string' | |
jobs: | |
tag_repo: | |
name: Tag Repository | |
runs-on: ubuntu-latest | |
outputs: | |
next_rev: ${{ steps.set_revs.outputs.next_rev }} | |
test_one: test_one | |
test_two: test_three=bar | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.static_repo_ref || 'main' }} | |
- name: "Fetch git info" | |
run: | | |
git fetch --quiet | |
- name: "Set Revisions" | |
id: set_revs | |
run: | | |
prev_rev=`git tag -l 'r*' --sort=v:refname | tail -n 1` | |
echo "prev_rev=$prev_rev" >> "$GITHUB_OUTPUT" | |
prev_rev_num=${prev_rev/r} | |
next_rev_num=$((prev_rev_num + 1)) | |
next_rev=r$next_rev_num | |
echo "next_rev=$next_rev" >> "$GITHUB_OUTPUT" | |
- name: "Set Body" | |
id: set_body | |
env: | |
PREV_REV: ${{ steps.set_revs.outputs.prev_rev }} | |
run: | | |
BODY=`git log --pretty=format:"- %s" $PREV_REV..HEAD` | |
echo "body=$BODY" >> "$GITHUB_OUTPUT" | |
- name: Release | |
if: ${{ env.NEXT_REV == 'dont run' }} | |
uses: softprops/action-gh-release@v2 | |
with: | |
body: ${{ steps.set_body.outputs.body }} | |
tag_name: ${{ steps.set_revs.outputs.next_rev }} | |
test_output: | |
name: Verifying Output | |
runs-on: ubuntu-latest | |
needs: tag_repo | |
steps: | |
- name: Verify output | |
env: | |
OUTPUT: ${{ needs.tag_repo.outputs.next_rev }} | |
TEST_ONE: ${{ needs.tag_repo.outputs.test_one }} | |
TEST_TWO: ${{ needs.tag_repo.outputs.test_two }} | |
TEST_THREE: ${{ needs.tag_repo.outputs.test_three }} | |
run: | | |
echo $OUTPUT | |
echo $TEST_ONE | |
echo $TEST_TWO | |
echo $TEST_THREE |