[core] 2024.10.7 #114
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
docker-build: | |
runs-on: ${{ matrix.runner }} | |
name: ${{ matrix.platform }} - ${{ matrix.browser }} - ${{ matrix.tag }} | |
strategy: | |
matrix: | |
include: | |
# Chromium - x86 | |
- runner: 'buildjet-4vcpu-ubuntu-2204' | |
tag: 'latest' | |
platform: 'amd64' | |
browser: 'chromium' | |
goss: 'goss-linux-amd64' | |
# Chromium - ARM | |
- runner: 'buildjet-4vcpu-ubuntu-2204-arm' | |
tag: 'arm' | |
platform: 'linux/arm64' | |
browser: 'chromium' | |
goss: 'goss-linux-arm' | |
# Chrome - x86 | |
- runner: 'buildjet-4vcpu-ubuntu-2204' | |
tag: 'chrome' | |
platform: 'amd64' | |
browser: 'chrome' | |
goss: 'goss-linux-amd64' | |
# Chrome - ARM (Chrome is not available for ARM) | |
#- runner: "buildjet-4vcpu-ubuntu-2204-arm" | |
# tag: "chrome-arm" | |
# platform: "linux/arm64" | |
# browser: "chrome" | |
# goss: 'goss-linux-arm' | |
# No browser - x86 | |
- runner: 'buildjet-4vcpu-ubuntu-2204' | |
tag: 'noweb' | |
platform: 'amd64' | |
browser: 'none' | |
goss: 'goss-linux-amd64' | |
# No browser - ARM | |
- runner: 'buildjet-4vcpu-ubuntu-2204-arm' | |
tag: 'noweb-arm' | |
platform: 'linux/arm64' | |
browser: 'none' | |
goss: 'goss-linux-arm' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ vars.DOCKER_IMAGE }} | |
flavor: latest=false | |
tags: | | |
type=raw,value=${{ matrix.tag }} | |
type=raw,value=${{ matrix.tag }}-{{tag}} | |
- name: Login to image repository | |
if: github.ref_type == 'tag' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: Dockerfile | |
platforms: ${{ matrix.platform }} | |
build-args: | | |
USE_BROWSER=${{ matrix.browser }} | |
push: false | |
load: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Install goss | |
env: | |
GOSS_DOWNLOAD: 'https://github.com/goss-org/goss/releases/download' | |
GOSS_VERSION: 'v0.4.8' | |
run: | | |
curl -L https://github.com/goss-org/goss/releases/download/${{ env.GOSS_VERSION }}/${{ matrix.goss }} -o /usr/local/bin/goss | |
chmod +rx /usr/local/bin/goss | |
- name: Run smoke tests | |
working-directory: tests/smoke | |
timeout-minutes: 2 | |
run: | | |
docker run -d --name smoke --rm -p3000:3000 ${{ vars.DOCKER_IMAGE }}:${{ matrix.tag }} | |
sleep 3 | |
docker logs smoke | |
goss validate --retry-timeout 30s --sleep 1s | |
docker rm --force smoke | |
- name: Push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: Dockerfile | |
platforms: ${{ matrix.platform }} | |
build-args: | | |
USE_BROWSER=${{ matrix.browser }} | |
push: ${{ github.ref_type == 'tag' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |