Update deps (#17) #73
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: Build and publish Docker image | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "v*.*.*" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image-amd64: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run e2e tests | |
run: | | |
set -e | |
for test in $(ls ./test/fixtures) | |
do | |
if [ "$test" == "report_parser" ] ; then | |
echo "Skipping test $test" | |
continue | |
fi | |
echo "Running test $test" | |
TEST_NAME=$test docker compose up --remove-orphans test --exit-code-from test | |
TEST_NAME=$test docker compose up output_verify --exit-code-from output_verify | |
done | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=semver,pattern={{version}} | |
type=edge,branch=master | |
- name: Set short sha | |
shell: bash | |
run: | | |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
# At the moment it is impossible to build linux/arm image | |
# build-and-push-image-arm: | |
# runs-on: ubuntu-latest | |
# permissions: | |
# contents: read | |
# packages: write | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Setup QEMU | |
# uses: docker/setup-qemu-action@v2 | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v2 | |
# - name: Login to Container Registry | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ${{ env.REGISTRY }} | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Extract metadata (tags, labels) for Docker | |
# id: meta | |
# uses: docker/metadata-action@v4 | |
# with: | |
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
# tags: | | |
# type=semver,pattern={{version}} | |
# type=edge,branch=master | |
# - name: Set short sha | |
# shell: bash | |
# run: | | |
# echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
# - name: Build and push Docker image | |
# uses: docker/build-push-action@v4 | |
# with: | |
# context: . | |
# platforms: linux/arm | |
# push: true | |
# tags: ${{ steps.meta.outputs.tags }} | |
# cache-from: type=gha | |
# cache-to: type=gha,mode=max |