mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
update base workflows to pantry.core#78 and prune usused
This commit is contained in:
parent
d653337393
commit
c8c8e3c367
4 changed files with 28 additions and 46 deletions
22
.github/workflows/cd.yml
vendored
22
.github/workflows/cd.yml
vendored
|
@ -10,26 +10,12 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: >
|
||||
grep -E ' github: [^\w]+/[^\w]+' projects/**/package.yml |
|
||||
grep -E ' github: [^\w]+/[^\w/]+' projects/**/package.yml |
|
||||
sed -e 's|^projects/\(.*\)/package.yml: *github: \([^/]*/[^/]*\).*|{ "project": "\1", "github": "\2" }|' |
|
||||
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: teaxyz/pantry.core/.github/workflows/build.yml@main
|
||||
with:
|
||||
projects: ${{ needs.get-diff.outputs.diff }}
|
||||
upload: true
|
||||
bottle:
|
||||
#FIXME: will fail (harmlessly) on non-merge/non-new-version runs
|
||||
uses: teaxyz/pantry.core/.github/workflows/bottle.yml@main
|
||||
secrets: inherit
|
||||
if: ${{ needs.get-diff.outputs.diff != '' }}
|
11
.github/workflows/ci-scripts.yml
vendored
11
.github/workflows/ci-scripts.yml
vendored
|
@ -1,11 +0,0 @@
|
|||
on:
|
||||
pull_request:
|
||||
paths: scripts/**.ts
|
||||
|
||||
jobs:
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TEA_SECRET: ${{ secrets.TEA_SECRET }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
24
.github/workflows/cleanup.yml
vendored
Normal file
24
.github/workflows/cleanup.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: cleanup
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- name: remove staged artifacts
|
||||
run: |
|
||||
REPO=$(echo ${{github.repository}} | sed -e 's_teaxyz/__')
|
||||
PR=$(echo ${{github.ref}} | sed -e 's_refs/pull/\(.*\)/merge_\1_')
|
||||
|
||||
aws s3 rm --recursive s3://$AWS_S3_CACHE/pull-request/$REPO/$PR
|
||||
if: startsWith(github.ref, 'refs/pull/') && startsWith(github.repository, 'teaxyz/pantry.')
|
||||
env:
|
||||
AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }}
|
17
.github/workflows/new-version.yml
vendored
17
.github/workflows/new-version.yml
vendored
|
@ -1,17 +0,0 @@
|
|||
name: new-version
|
||||
run-name: new-version (${{ inputs.projects }})
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
projects:
|
||||
description: eg. `foo.com@1.2.3 bar.com@2.3.4`
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: teaxyz/pantry.core/.github/workflows/build.yml@main
|
||||
with:
|
||||
projects: ${{ inputs.projects }}
|
||||
upload: true
|
||||
secrets: inherit
|
Loading…
Reference in a new issue