Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Publish load test image for labeld PRs
Cezary Miączcaaaf81ad699
diff --git a/.github/workflows/publish-containers.yml b/.github/workflows/publish-containers.ymlindex 8f52571c2b..84cf1f3106 100644--- a/.github/workflows/publish-containers.yml+++ b/.github/workflows/publish-containers.yml@@ -1,13 +1,18 @@name: Publishon:- push:- tags:- # Matches stable and pre-releases- - "[0-9]+.[0-9]+.[0-9]+*"- branches:- - main- - ci/**+ workflow_call:+ inputs:+ prefix:+ description: Optional image prefix for branch build+ required: false+ type: string+ secrets:+ GITHUB_TOKEN:+ SLACK_WEBHOOK_URL:+ SLACK_MENTION_GROUP_ID:+ outputs:+ version: ${{ steps.meta.outputs.version }}jobs:docker:@@ -36,7 +41,7 @@ jobs:images: |ghcr.io/${{ steps.image.outputs.image_name }}tags: |- type=ref,event=branch,prefix=unstable-+ type=ref,event=branch,prefix={{inputs.prefix}}type=pep440,pattern={{version}}type=pep440,pattern={{major}}.{{minor}}@@ -75,15 +80,6 @@ jobs:Digest: ${{ steps.docker_build.outputs.digest }}Tags: ${{ steps.meta.outputs.tags }}"- - name: Trigger staging deployment for tagged release- if: ${{ startsWith(github.ref, 'refs/tags/') }}- run: |- curl -f -X POST \- -H "Accept: application/vnd.github.v3+json" \- -H "Authorization: Bearer ${{ secrets.SALEOR_RELEASE_TOKEN }}" \- https://api.github.com/repos/saleor/saleor-multitenant/dispatches \- -d "{\"event_type\":\"deploy-staging\",\"client_payload\":{\"version\":\"${{ steps.meta.outputs.version }}\"}}"-- name: Notify Slackif: ${{ failure() }}env:diff --git a/.github/workflows/publish-load-test.yml b/.github/workflows/publish-load-test.ymlnew file mode 100644index 0000000000..5824891d76--- /dev/null+++ b/.github/workflows/publish-load-test.yml@@ -0,0 +1,30 @@+name: Publish for load test++on:+ pull_request:+ types: [reopened, synchronize, labeled]+ branches: ["**"]++jobs:+ publish:+ if: ${{ ((github.event.action == 'labeled') && (github.event.label.name == 'load test')) || ((github.event.action != 'labeled') && contains(github.event.pull_request.labels.*.name, 'load test')) }}+ uses: ./.github/workflows/publish-containers.yaml+ with:+ prefix: load-test-+ secrets:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLOUD_CI_WEBHOOK_URL }}+ SLACK_MENTION_GROUP_ID: ${{ secrets.SLACK_CORE_SUPPORT_GROUP_ID }}++ deploy:+ runs-on: ubuntu-20.04+ needs:+ - publish+ steps:+ - name: Trigger load test deployment+ run: |+ curl -f -X POST \+ -H "Accept: application/vnd.github.v3+json" \+ -H "Authorization: Bearer ${{ secrets.SALEOR_RELEASE_TOKEN }}" \+ https://api.github.com/repos/saleor/saleor-multitenant/dispatches \+ -d "{\"event_type\":\"deploy-load-test\",\"client_payload\":{\"version\":\"${{ needs.publish.outputs.version }}\"}}"diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.ymlnew file mode 100644index 0000000000..1552e38849--- /dev/null+++ b/.github/workflows/publish-main.yml@@ -0,0 +1,17 @@+name: Publish main++on:+ push:+ branches:+ - main+ - ci/**++jobs:+ publish:+ uses: ./.github/workflows/publish-containers.yaml+ with:+ prefix: unstable-+ secrets:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLOUD_CI_WEBHOOK_URL }}+ SLACK_MENTION_GROUP_ID: ${{ secrets.SLACK_CORE_SUPPORT_GROUP_ID }}diff --git a/.github/workflows/publish-release-tag.yml b/.github/workflows/publish-release-tag.ymlnew file mode 100644index 0000000000..727f0b6ea4--- /dev/null+++ b/.github/workflows/publish-release-tag.yml@@ -0,0 +1,28 @@+name: Publish release tag++on:+ push:+ tags:+ # Matches stable and pre-releases+ - "[0-9]+.[0-9]+.[0-9]+*"++jobs:+ publish:+ uses: ./.github/workflows/publish-containers.yaml+ secrets:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLOUD_CI_WEBHOOK_URL }}+ SLACK_MENTION_GROUP_ID: ${{ secrets.SLACK_CORE_SUPPORT_GROUP_ID }}++ deploy:+ runs-on: ubuntu-20.04+ needs:+ - publish+ steps:+ - name: Trigger staging deployment for tagged release+ run: |+ curl -f -X POST \+ -H "Accept: application/vnd.github.v3+json" \+ -H "Authorization: Bearer ${{ secrets.SALEOR_RELEASE_TOKEN }}" \+ https://api.github.com/repos/saleor/saleor-multitenant/dispatches \+ -d "{\"event_type\":\"deploy-staging\",\"client_payload\":{\"version\":\"${{ needs.publish.outputs.version }}\"}}"