mirror of
https://github.com/ivabus/pantry
synced 2024-11-27 02:35: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:
|
projects:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
upload:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -197,6 +201,7 @@ jobs:
|
||||||
|
|
||||||
- name: upload bottles
|
- name: upload bottles
|
||||||
id: upload
|
id: upload
|
||||||
|
if: ${{ inputs.upload }}
|
||||||
run: pantry/scripts/upload.ts
|
run: pantry/scripts/upload.ts
|
||||||
--pkgs ${{ needs.build.outputs.built }} ${{ needs.build.outputs.built }}
|
--pkgs ${{ needs.build.outputs.built }} ${{ needs.build.outputs.built }}
|
||||||
--srcs ${{ needs.build.outputs.srcs }} ${{ needs.build.outputs.srcs }}
|
--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
|
#NOTE ideally we’d invalidate all at once so this is atomic
|
||||||
# however GHA can’t consolidate outputs from a matrix :/
|
# however GHA can’t consolidate outputs from a matrix :/
|
||||||
- uses: chetan/invalidate-cloudfront-action@v2
|
- uses: chetan/invalidate-cloudfront-action@v2
|
||||||
|
if: ${{ inputs.upload }}
|
||||||
env:
|
env:
|
||||||
PATHS: ${{ steps.upload.outputs.cf-invalidation-paths }}
|
PATHS: ${{ steps.upload.outputs.cf-invalidation-paths }}
|
||||||
DISTRIBUTION: ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
|
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 . |
|
jq -sc . |
|
||||||
curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \
|
curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \
|
||||||
-H "content-type: application/json" -H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" -d @-
|
-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
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
projects: ${{ inputs.projects }}
|
projects: ${{ inputs.projects }}
|
||||||
|
upload: true
|
||||||
secrets: inherit
|
secrets: inherit
|
|
@ -22,3 +22,4 @@ test:
|
||||||
test "$OUT" = "$INPUT"
|
test "$OUT" = "$INPUT"
|
||||||
env:
|
env:
|
||||||
INPUT: Hello, World!
|
INPUT: Hello, World!
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue