mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
skip upload steps on CI (#1)
This commit is contained in:
parent
89bb6bf292
commit
e1d2ab4f47
4 changed files with 27 additions and 1 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -5,6 +5,10 @@ on:
|
|||
projects:
|
||||
required: true
|
||||
type: string
|
||||
upload:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -197,6 +201,7 @@ jobs:
|
|||
|
||||
- name: upload bottles
|
||||
id: upload
|
||||
if: ${{ inputs.upload }}
|
||||
run: pantry/scripts/upload.ts
|
||||
--pkgs ${{ needs.build.outputs.built }} ${{ needs.build.outputs.built }}
|
||||
--srcs ${{ needs.build.outputs.srcs }} ${{ needs.build.outputs.srcs }}
|
||||
|
@ -210,6 +215,7 @@ jobs:
|
|||
#NOTE ideally we’d invalidate all at once so this is atomic
|
||||
# however GHA can’t consolidate outputs from a matrix :/
|
||||
- uses: chetan/invalidate-cloudfront-action@v2
|
||||
if: ${{ inputs.upload }}
|
||||
env:
|
||||
PATHS: ${{ steps.upload.outputs.cf-invalidation-paths }}
|
||||
DISTRIBUTION: ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
|
||||
|
|
18
.github/workflows/cd.yml
vendored
18
.github/workflows/cd.yml
vendored
|
@ -15,3 +15,21 @@ jobs:
|
|||
jq -sc . |
|
||||
curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \
|
||||
-H "content-type: application/json" -H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" -d @-
|
||||
get-diff:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
diff: ${{ steps.diff.outputs.diff }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: technote-space/get-diff-action@v6
|
||||
id: diff
|
||||
with:
|
||||
PATTERNS: projects/**/package.yml
|
||||
build:
|
||||
needs: [get-diff]
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
projects: ${{ needs.get-diff.outputs.diff }}
|
||||
upload: true
|
||||
secrets: inherit
|
||||
if: ${{ needs.get-diff.outputs.diff != '' }}
|
1
.github/workflows/new-version.yml
vendored
1
.github/workflows/new-version.yml
vendored
|
@ -13,4 +13,5 @@ jobs:
|
|||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
projects: ${{ inputs.projects }}
|
||||
upload: true
|
||||
secrets: inherit
|
|
@ -22,3 +22,4 @@ test:
|
|||
test "$OUT" = "$INPUT"
|
||||
env:
|
||||
INPUT: Hello, World!
|
||||
|
||||
|
|
Loading…
Reference in a new issue