Skip to content

Commit

Permalink
Update action_main.yml to run publish actions only when releases are …
Browse files Browse the repository at this point in the history
…published
  • Loading branch information
meffmadd committed Dec 19, 2023
1 parent 4cab2b0 commit 0a3ad4e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/action_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit 0a3ad4e

Please sign in to comment.