From 0a3ad4e67d71dfbff2fd1f73f41e23a13e2bc9ca Mon Sep 17 00:00:00 2001 From: "Matt, Matthias" Date: Tue, 19 Dec 2023 14:07:00 +0100 Subject: [PATCH] Update action_main.yml to run publish actions only when releases are published --- .github/workflows/action_main.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/action_main.yml b/.github/workflows/action_main.yml index 4453917b..ce75cfa7 100644 --- a/.github/workflows/action_main.yml +++ b/.github/workflows/action_main.yml @@ -2,14 +2,13 @@ name: MAIN on: push: - tags: - - grader-service-* - - grader-convert-* - - grader-labextension-* branches: - main pull_request: types: [opened, synchronize, reopened] + release: + types: + - published jobs: init: @@ -82,18 +81,18 @@ jobs: # ONLY ON TAGS release_grader-service: needs: dockerize_grader-service - if: startsWith(github.ref, 'refs/tags/grader-service') + if: startsWith(github.event.release.tag_name, 'grader-service') uses: ./.github/workflows/publish_service.yml secrets: inherit release_labextension: needs: build_labextension - if: startsWith(github.ref, 'refs/tags/grader-labextension') + if: startsWith(github.event.release.tag_name, 'grader-labextension') uses: ./.github/workflows/publish_labextension.yml secrets: inherit release_convert: needs: build_convert - if: startsWith(github.ref, 'refs/tags/grader-convert') + if: startsWith(github.event.release.tag_name, 'grader-convert') uses: ./.github/workflows/publish_convert.yml secrets: inherit