Add missing locks for price recalculation (#15901) (#15906) #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
# Matches stable and pre-releases | |
- "[0-9]+.[0-9]+.[0-9]+*" | |
branches: | |
- main | |
- ci/** | |
jobs: | |
docker: | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Outputs the name of the repository (owner/repo) | |
- name: Build Image Name | |
id: image | |
run: | | |
# The name of the owner and of the repository: owner/repository | |
IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') | |
echo "image_name=$IMAGE_NAME" >> $GITHUB_OUTPUT | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/${{ steps.image.outputs.image_name }} | |
tags: | | |
type=ref,event=branch,prefix=unstable- | |
type=pep440,pattern={{version}} | |
type=pep440,pattern={{major}}.{{minor}} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
context: . | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
- name: Image digest | |
run: | | |
echo $"\ | |
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 Slack | |
if: ${{ failure() }} | |
env: | |
JOB_STATUS: ${{ job.status }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLOUD_CI_WEBHOOK_URL }} | |
SLACK_MENTION_GROUP_ID: ${{ secrets.SLACK_CORE_SUPPORT_GROUP_ID }} | |
JOB_TITLE: "Build of Saleor Core ${{ steps.meta.outputs.version }}" | |
run: | | |
python3 ./.github/workflows/notify/notify-slack.py |