Skip to content

Commit

Permalink
feat (github-deploy.yml): we now run the deploy logic only on the mai…
Browse files Browse the repository at this point in the history
…nstream branches
  • Loading branch information
dsidirop committed Mar 15, 2024
1 parent a902e7a commit d19e8d7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/github-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
# https://docs.github.com/en/actions/migrating-to-github-actions/automated-migrations/migrating-from-azure-devops-with-github-actions-importer#environment-variable-mapping
#

name: Builder
name: 'Builder'

env:
Build_Repository_Folderpath: ${{ github.workspace }}

on:
workflow_call: # reusable workflows other workflows can trigger this
workflow_dispatch: # allows to run this workflow manually from the actions tab

push:
branches:
- "**" # only trigger on branches not on tags
- '**' # '*' matches zero or more characters but does not match the `/` character '**' matches zero or more of any character
- '!main' # main will trigger/reuse this workflow by other means via workflow call
- '!master' # master will trigger/reuse this workflow by other means via workflow call
- '!develop' # develop will trigger/reuse this workflow by other means via workflow call
- '!ksidirop/MAN-296-migrate-to-github-actions'

pull_request:
branches:
- "main"
- "develop"

jobs:

Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/github-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ name: 'Deploy Nugets'

on:

workflow_run:
types: [ "completed" ]
branches: [ "main", "develop" ]
workflows: [ "Builder" ]
push:
branches: [ "main", "master", "develop", "ksidirop/MAN-296-migrate-to-github-actions" ]

workflow_dispatch: # allows to run this workflow manually from the Actions tab


workflow_dispatch: # Allows to run this workflow manually from the Actions tab

jobs:

compile:
uses: './.github/workflows/github-compile.yml' # reuse the compile workflow


deploy:
runs-on: macos-14

needs: [ "build" ]
needs: "build"

steps:

Expand Down

0 comments on commit d19e8d7

Please sign in to comment.