From 63cfd80719857e5b6ffedd54ea08d04b0c208790 Mon Sep 17 00:00:00 2001 From: Sylvan LE DEUNFF Date: Sun, 24 Sep 2023 23:32:46 +0200 Subject: [PATCH] Update example.yml --- .github/workflows/example.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 }}"