Skip to content

Workflow file for this run

name: Docker image build CI - build docker image.
on:
release:
types: [ published ]
jobs:
docker:
name: Build and push SDK semver release docker images
runs-on: ubuntu-22.04
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v2
# Multi-platform set up.
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# https://github.com/docker/login-action
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# https://github.com/docker/build-push-action
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./infrastructure/sdk.Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: spryker/php-sdk:${{ github.event.release.tag_name }}
labels: Release ${{ github.event.release.tag_name }}
docker-sprykerci-74:
name: Build and push docker image for SprykerCI PHP 7.4
runs-on: ubuntu-22.04
needs: docker
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v2
# https://github.com/docker/login-action
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# https://github.com/docker/build-push-action
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./infrastructure/sdk.sprykerci74.Dockerfile
platforms: linux/amd64
push: true
tags: spryker/php-sdk:sprykerci-7.4
labels: SprykerCI
docker-sprykerci-80:
name: Build and push docker image for SprykerCI PHP 8.0
runs-on: ubuntu-22.04
needs: docker
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v2
# https://github.com/docker/login-action
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# https://github.com/docker/build-push-action
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./infrastructure/sdk.sprykerci80.Dockerfile
platforms: linux/amd64
push: true
tags: spryker/php-sdk:sprykerci-8.0,spryker/php-sdk:sprykerci
labels: SprykerCI
docker-sprykerci-81:
name: Build and push docker image for SprykerCI PHP 8.1
runs-on: ubuntu-22.04
needs: docker
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v2
# https://github.com/docker/login-action
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# https://github.com/docker/build-push-action
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./infrastructure/sdk.sprykerci81.Dockerfile
platforms: linux/amd64
push: true
tags: spryker/php-sdk:sprykerci-8.1
labels: SprykerCI
installer:
name: Create and publish Spryker SDK installer
runs-on: ubuntu-22.04
needs: docker
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v2
# Get details of the latest release.
- name: Get latest release
id: latest_release
uses: kaliber5/action-get-release@v1
with:
token: ${{ github.token }}
latest: true
# Build `installer.sh` script. The result script will be placed into `./build` directory.
- name: Run installer creation
shell: bash
run: |
./infrastructure/installer_builder.sh ${{ github.event.release.tag_name }}
# Uploads `installer.sh` script. Requires `upload_url` from the `latest_release` step.
- name: Upload installer.sh
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.latest_release.outputs.upload_url }}
asset_path: ./build/installer.sh
asset_name: installer.sh
asset_content_type: text/x-shellscript
trigger-sprykerci:
name: Triggers SprykerCI post-release pipeline
runs-on: ubuntu-22.04
needs: [ docker-sprykerci-74, docker-sprykerci-80, docker-sprykerci-81, installer ]
steps:
- name: Trigger CI pipeline
shell: bash
run: |
curl -X POST https://eu.buddy.works/paas-demo/sdk/pipelines/pipeline/181690/trigger-webhook?token=${{ secrets.EXTERNAL_CI_HOOK_TOKEN }}