Skip to content

Update main_cicd_test.yml #16

Update main_cicd_test.yml

Update main_cicd_test.yml #16

name: Main Server CI/CD
on:
pull_request:
branches: [ "main" ]
types: [ "close" ]
permissions:
contents: read
jobs:
check-branch:
if: contains(github.head_ref, 'Release')
runs-on: ubuntu-latest
steps:
- name: check branch
run: |
echo 'Passed the check to see if it was a release branch'
check-merged:
needs: check-branch
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: check merged

Check failure on line 25 in .github/workflows/main_cicd_test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main_cicd_test.yml

Invalid workflow file

You have an error in your yaml syntax on line 25
run: |
echo 'The PR was merged'
extract-version:
needs: check-merged
runs-on: ubuntu-latest
steps:
- name: get repo
uses: actions/checkout@v4
with:
ref: ${{ env.GITHUB_SHA }}
- name: extract version
run: |
echo $(echo "$(git show -s --format=%s)" | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}') >> "$GITHUB_ENV"
use-env-test:
needs: extract-version
runs-on: ubuntu-latest
steps:
- name: use env test
run: |
echo "$VERSION"