From a9197ef6c2d421b6690579fadc34ba7c4c13c43a Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:33:08 +0100 Subject: [PATCH 1/9] echocontext --- .github/workflows/EchoContext.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/EchoContext.yml diff --git a/.github/workflows/EchoContext.yml b/.github/workflows/EchoContext.yml new file mode 100644 index 0000000..293eb4c --- /dev/null +++ b/.github/workflows/EchoContext.yml @@ -0,0 +1,14 @@ +name: EchoContext +on: + workflow_dispatch: + +jobs: + debug-job: + runs-on: ubuntu-latest + steps: + - name: Debug Event 1 + run: echo "$GITHUB_CONTEXT" + - name: Debug Event 2 + run: echo "${{ github }}" + - name: Debug Event 3 + run: echo "${{ toJSON(github) }}" \ No newline at end of file From 2b113b360ef7e34ea8c2ed08687a16d0c4c63ff3 Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:45:52 +0100 Subject: [PATCH 2/9] Envir tests --- .github/workflows/FETests.yml | 38 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/FETests.yml b/.github/workflows/FETests.yml index c8e2982..9adf426 100644 --- a/.github/workflows/FETests.yml +++ b/.github/workflows/FETests.yml @@ -3,14 +3,34 @@ name: Build And Deploy FE on: workflow_dispatch: push: - branches: - - develop + branches: + - develop + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref}} + cancel-in-progress: true jobs: - build: - name: Build ${{ github.ref_name}} - runs-on: ubuntu-latest - steps: - - name: MyChecks - run: echo "MyChecks" - \ No newline at end of file + build: + name: Build ${{ github.ref_name}} + runs-on: ubuntu-latest + steps: + - name: Github Context + run: echo "${{ toJSON(github) }}" + - name: head_ref + run: echo "${{ github.head_ref}}" + - name: ref_name + run: echo "${{ github.ref_name}}" + - name: ref + run: echo "${{ github.ref}}" + AsEnvir: + name: Build as envir + runs-on: ubuntu-latest + environment: + name: ${{github.head_ref}} + steps: + - name: envir var + run: echo "${{vars.API_URL}}" + - name: envir context + run: echo "${{toJSON(vars)}}" \ No newline at end of file From 537d76e2408619cad4b26ce2361ccc04beb414b8 Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:49:48 +0100 Subject: [PATCH 3/9] use ref_name --- .github/workflows/FETests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/FETests.yml b/.github/workflows/FETests.yml index 9adf426..035fcd4 100644 --- a/.github/workflows/FETests.yml +++ b/.github/workflows/FETests.yml @@ -28,7 +28,7 @@ jobs: name: Build as envir runs-on: ubuntu-latest environment: - name: ${{github.head_ref}} + name: ${{github.ref_name}} steps: - name: envir var run: echo "${{vars.API_URL}}" From 52582c77a9e9e8ff24ff99dcd994184356cc579e Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:35:37 +0100 Subject: [PATCH 4/9] include PRs --- .github/workflows/FETests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/FETests.yml b/.github/workflows/FETests.yml index 035fcd4..c9ee25c 100644 --- a/.github/workflows/FETests.yml +++ b/.github/workflows/FETests.yml @@ -5,6 +5,13 @@ on: push: branches: - develop + - test + - master + pull_request: + types: [opened, synchronize, reopened, closed, ready_for_review] + branches: + - develop + - test - master concurrency: From 45c55f295f5640e2e56d60d6bd3cd41ce7879d88 Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:45:38 +0100 Subject: [PATCH 5/9] tenary test --- .github/workflows/FETests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/FETests.yml b/.github/workflows/FETests.yml index c9ee25c..b49f4d9 100644 --- a/.github/workflows/FETests.yml +++ b/.github/workflows/FETests.yml @@ -35,7 +35,7 @@ jobs: name: Build as envir runs-on: ubuntu-latest environment: - name: ${{github.ref_name}} + name: ${{ github.base_ref || github.ref_name}} steps: - name: envir var run: echo "${{vars.API_URL}}" From f0d0d0b35093ce8641bca1022ebba459ba46321f Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:47:38 +0100 Subject: [PATCH 6/9] Log base_ref and set name correctly --- .github/workflows/FETests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/FETests.yml b/.github/workflows/FETests.yml index b49f4d9..17503e8 100644 --- a/.github/workflows/FETests.yml +++ b/.github/workflows/FETests.yml @@ -20,13 +20,15 @@ concurrency: jobs: build: - name: Build ${{ github.ref_name}} + name: Build ${{ github.base_ref || github.ref_name}} runs-on: ubuntu-latest steps: - name: Github Context run: echo "${{ toJSON(github) }}" - name: head_ref run: echo "${{ github.head_ref}}" + - name: base_ref + run: echo "${{ github.base_ref}}" - name: ref_name run: echo "${{ github.ref_name}}" - name: ref From cf72bc25ac17cf145a877374fa9b6a9baa53db4b Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 5 Aug 2024 09:51:57 +0200 Subject: [PATCH 7/9] Push --- .github/workflows/ExitCodes.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/ExitCodes.yml diff --git a/.github/workflows/ExitCodes.yml b/.github/workflows/ExitCodes.yml new file mode 100644 index 0000000..22632de --- /dev/null +++ b/.github/workflows/ExitCodes.yml @@ -0,0 +1,21 @@ +name: Exit code test + +on: + workflow_dispatch: + +jobs: + build: + needs: setup-and-cache + runs-on: ubuntu-latest + name: Build (${{ github.ref_name }}) + environment: + name: ${{ github.base_ref || github.ref_name }} + steps: + - if: ${{ vars.API_URL == '' }} + run : | + echo "Variable was empty" + exit 1 + - name: Checkout Commit + uses: actions/checkout@v3 + with: + submodules: true \ No newline at end of file From f9eb9a0391b864fea9ecc6e4d4ba8da0b91bdf4c Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 5 Aug 2024 09:56:02 +0200 Subject: [PATCH 8/9] Create ExitCodes2.yml --- .github/workflows/ExitCodes2.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/ExitCodes2.yml diff --git a/.github/workflows/ExitCodes2.yml b/.github/workflows/ExitCodes2.yml new file mode 100644 index 0000000..d0dfe5a --- /dev/null +++ b/.github/workflows/ExitCodes2.yml @@ -0,0 +1,20 @@ +name: Exit code test + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + name: Build (${{ github.ref_name }}) + environment: + name: ${{ github.base_ref || github.ref_name }} + steps: + - if: ${{ vars.API_URL == '' }} + run : | + echo "Variable was empty" + exit 1 + - name: Checkout Commit + uses: actions/checkout@v3 + with: + submodules: true From c9c63b8b5648e3913e34b337013dfff41b2a15c9 Mon Sep 17 00:00:00 2001 From: Maarten Clauwaert <91329133+MClauwaert@users.noreply.github.com> Date: Mon, 5 Aug 2024 09:56:19 +0200 Subject: [PATCH 9/9] correct yml --- .github/workflows/ExitCodes.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ExitCodes.yml b/.github/workflows/ExitCodes.yml index 22632de..bc3e8fe 100644 --- a/.github/workflows/ExitCodes.yml +++ b/.github/workflows/ExitCodes.yml @@ -5,7 +5,6 @@ on: jobs: build: - needs: setup-and-cache runs-on: ubuntu-latest name: Build (${{ github.ref_name }}) environment: