diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index a9e2b3e..a115397 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -9,6 +9,11 @@ jobs: if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'version/') runs-on: ubuntu-latest steps: - - name: "Do weird deployment" - run: echo "Source branch ${{ github.head_ref }}" - + - id: parse-version + name: "Parse version from branch name" + run: | + export BRANCH_NAME="${{ github.head_ref }}" + echo "version=${BRANCH_NAME/version\//}" >> $GITHUB_OUTPUT + + - name: "Display parsed version" + run: "echo ${{ steps.parse-version.outputs.version }}"