Skip to content

Commit 650645e

Browse files
committed
update workers to accept local commits and ignore dev
1 parent 9abeb8b commit 650645e

4 files changed

Lines changed: 17 additions & 24 deletions

File tree

.github/workflows/dev_api.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@
33

44
name: dev_api
55

6-
on:
7-
push:
8-
branches:
9-
- dev
10-
workflow_dispatch:
6+
on:
7+
workflow_dispatch:
118

129
env:
1310
AZURE_FUNCTIONAPP_PACKAGE_PATH: "." # set this to the path to your web app project, defaults to the repository root
1411

15-
jobs:
16-
deploy:
12+
jobs:
13+
deploy:
1714
permissions:
1815
id-token: write #This is required for requesting the JWT
1916
contents: read #This is required for actions/checkout
20-
if: github.event.repository.fork == false && github.event_name == 'push'
17+
if: github.repository == 'criani/CIPP-API' && github.event_name == 'workflow_dispatch'
2118
runs-on: windows-latest
2219

2320
steps:

.github/workflows/dev_cippjta72.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33

44
name: Build and deploy Powershell project to Azure Function App - cippjta72
55

6-
on:
7-
push:
8-
branches:
9-
- dev
10-
workflow_dispatch:
6+
on:
7+
workflow_dispatch:
118

129
env:
1310
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
1411

15-
jobs:
16-
deploy:
17-
runs-on: ubuntu-latest
12+
jobs:
13+
deploy:
14+
if: github.repository == 'criani/CIPP-API' && github.event_name == 'workflow_dispatch'
15+
runs-on: ubuntu-latest
1816

1917
steps:
2018
- name: 'Checkout GitHub Action'
@@ -29,4 +27,4 @@ jobs:
2927
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
3028
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_1EBE9D73F9EC4528BA666FC934055536 }}
3129
sku: 'flexconsumption'
32-
30+

.github/workflows/publish_release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
push:
55
branches:
66
- master
7+
- main
8+
workflow_dispatch:
79

810
permissions:
911
contents: write
1012

1113
jobs:
1214
release:
13-
if: github.event.repository.fork == false && github.event_name == 'push'
15+
if: github.repository == 'criani/CIPP-API' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
1416
name: Generate Release Notes and Upload to Azure
1517
runs-on: ubuntu-latest
1618

@@ -108,7 +110,6 @@ jobs:
108110

109111
# Create ZIP File in a New Source Directory
110112
- name: Prepare and Zip Release Files
111-
if: env.tag_exists == 'false'
112113
run: |
113114
mkdir -p src/releases
114115
zip -r src/releases/latest.zip . \
@@ -118,7 +119,6 @@ jobs:
118119
119120
# Upload to Azure Blob Storage
120121
- name: Azure Blob Upload with Destination folder defined
121-
if: env.tag_exists == 'false'
122122
uses: LanceMcCarthy/Action-AzureBlobUpload@v3.3.0
123123
with:
124124
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}

.github/workflows/upload_dev.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: Upload Dev zip
22

33
on:
4-
push:
5-
branches:
6-
- dev
4+
workflow_dispatch:
75

86
jobs:
97
release:
10-
if: github.event.repository.fork == false && github.event_name == 'push'
8+
if: github.repository == 'criani/CIPP-API' && github.event_name == 'workflow_dispatch'
119
name: Upload to Azure
1210
runs-on: ubuntu-latest
1311

0 commit comments

Comments
 (0)