mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
make branches actually parallel (#167)
* make branches actually parallel * more * wut * wip * wip
This commit is contained in:
parent
d9106f68a3
commit
68a47ae737
6 changed files with 81 additions and 103 deletions
26
.github/workflows/bottle.yml
vendored
26
.github/workflows/bottle.yml
vendored
|
@ -243,24 +243,10 @@ jobs:
|
|||
PR: ${{ needs.bottle.outputs.pr }}
|
||||
|
||||
complain:
|
||||
if: failure() && inputs.new-version == 'true'
|
||||
needs: [upload]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: martialonline/workflow-status@v3
|
||||
id: status
|
||||
- uses: rtCamp/action-slack-notify@v2
|
||||
if: ${{ env.SLACK_WEBHOOK != '' }}
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
|
||||
SLACK_MESSAGE: new-version:${{ inputs.projects }} (${{ inputs.platform }}) ${{ steps.status.outputs.status }}
|
||||
SLACK_COLOR: ${{ steps.status.outputs.status }}
|
||||
- uses: actions/checkout@v3
|
||||
if: ${{ steps.status.outputs.status == 'failure' }}
|
||||
- uses: JasonEtco/create-an-issue@v2
|
||||
if: ${{ steps.status.outputs.status == 'failure' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PACKAGE: ${{ inputs.projects }} (${{ inputs.platform }})
|
||||
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
if: inputs.new-version == 'true' && failure()
|
||||
uses: ./.github/workflows/complain.yml
|
||||
with:
|
||||
projects: ${{ inputs.projects }}
|
||||
platform: ${{ inputs.platform }}
|
||||
secrets: inherit
|
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
|
@ -96,6 +96,7 @@ jobs:
|
|||
needs: [get-platform, build]
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ${{ fromJson(needs.get-platform.outputs.test-matrix) }}
|
||||
outputs:
|
||||
|
@ -125,6 +126,24 @@ jobs:
|
|||
env:
|
||||
HAS_SECRETS: ${{ secrets.AWS_S3_CACHE != null }}
|
||||
|
||||
bottle:
|
||||
needs: [test]
|
||||
if: inputs.new-version == true
|
||||
uses: ./.github/workflows/bottle.yml
|
||||
with:
|
||||
new-version: ${{ inputs.new-version }}
|
||||
platform: ${{ inputs.platform }}
|
||||
secrets: inherit
|
||||
|
||||
complain:
|
||||
needs: [test]
|
||||
if: inputs.new-version == true && failure()
|
||||
uses: ./.github/workflows/complain.yml
|
||||
with:
|
||||
projects: ${{ inputs.projects }}
|
||||
platform: ${{ inputs.platform }}
|
||||
secrets: inherit
|
||||
|
||||
stage:
|
||||
needs: [test]
|
||||
# this only works for PRs from our team to our repo (security! :( )
|
||||
|
@ -150,26 +169,3 @@ jobs:
|
|||
AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
complain:
|
||||
if: failure() && inputs.new-version == 'true'
|
||||
needs: [test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: martialonline/workflow-status@v3
|
||||
id: status
|
||||
- uses: rtCamp/action-slack-notify@v2
|
||||
if: ${{ env.SLACK_WEBHOOK != '' }}
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
|
||||
SLACK_MESSAGE: new-version:${{ inputs.projects }} (${{ inputs.platform }}) ${{ steps.status.outputs.status }}
|
||||
SLACK_COLOR: ${{ steps.status.outputs.status }}
|
||||
- uses: actions/checkout@v3
|
||||
if: ${{ steps.status.outputs.status == 'failure' }}
|
||||
- uses: JasonEtco/create-an-issue@v2
|
||||
if: ${{ steps.status.outputs.status == 'failure' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PACKAGE: ${{ inputs.projects }} (${{ inputs.platform }})
|
||||
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
|
1
.github/workflows/cd.yml
vendored
1
.github/workflows/cd.yml
vendored
|
@ -25,6 +25,7 @@ jobs:
|
|||
|
||||
bottle-pr:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- darwin+x86-64
|
||||
|
|
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
@ -14,6 +14,7 @@ jobs:
|
|||
PATTERNS: projects/**/package.yml
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- darwin+x86-64
|
||||
|
|
32
.github/workflows/complain.yml
vendored
Normal file
32
.github/workflows/complain.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: complain
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
projects:
|
||||
required: true
|
||||
type: string
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
complain:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: rtCamp/action-slack-notify@v2
|
||||
if: ${{ env.SLACK_WEBHOOK != '' }}
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
|
||||
SLACK_MESSAGE: new-version:${{ inputs.projects }} (${{ inputs.platform }}) ${{ steps.status.outputs.status }}
|
||||
SLACK_COLOR: ${{ steps.status.outputs.status }}
|
||||
- uses: actions/checkout@v3
|
||||
- uses: JasonEtco/create-an-issue@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PACKAGE: ${{ inputs.projects }} (${{ inputs.platform }})
|
||||
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
46
.github/workflows/new-version.yml
vendored
46
.github/workflows/new-version.yml
vendored
|
@ -8,13 +8,11 @@ on:
|
|||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- darwin+x86-64
|
||||
|
@ -23,50 +21,14 @@ jobs:
|
|||
- linux+aarch64
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
new-version: true
|
||||
projects: ${{ inputs.projects }}
|
||||
platform: ${{ matrix.platform }}
|
||||
secrets: inherit
|
||||
bottle:
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- darwin+x86-64
|
||||
- linux+x86-64
|
||||
- darwin+aarch64
|
||||
- linux+aarch64
|
||||
needs: [build]
|
||||
uses: ./.github/workflows/bottle.yml
|
||||
with:
|
||||
new-version: true
|
||||
platform: ${{ matrix.platform }}
|
||||
secrets: inherit
|
||||
index_data:
|
||||
needs: [bottle]
|
||||
needs: [build]
|
||||
if: success()
|
||||
uses: ./.github/workflows/index-data.yml
|
||||
with:
|
||||
projects: ${{ inputs.projects }}
|
||||
secrets: inherit
|
||||
complain:
|
||||
if: failure()
|
||||
needs: [build, bottle]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: martialonline/workflow-status@v3
|
||||
id: status
|
||||
- uses: rtCamp/action-slack-notify@v2
|
||||
if: ${{ env.SLACK_WEBHOOK != '' }}
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
|
||||
SLACK_MESSAGE: new-version:${{ inputs.projects }} ${{ steps.status.outputs.status }}
|
||||
SLACK_COLOR: ${{ steps.status.outputs.status }}
|
||||
- uses: actions/checkout@v3
|
||||
if: ${{ steps.status.outputs.status == 'failure' }}
|
||||
- uses: JasonEtco/create-an-issue@v2
|
||||
if: ${{ steps.status.outputs.status == 'failure' }}
|
||||
with:
|
||||
filename: .github/NEW_VERSION_ISSUE_TEMPLATE.md
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PACKAGE: ${{ inputs.projects }}
|
||||
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
Loading…
Reference in a new issue