Skip to content

Merge pull request #298 from seatsurfing/improve-booking-times #118

Merge pull request #298 from seatsurfing/improve-booking-times

Merge pull request #298 from seatsurfing/improve-booking-times #118

name: Build Booking UI (dev)
on:
workflow_dispatch:
branches: [ master ]
push:
branches: [ "master" ]
permissions:
id-token: write
contents: read
attestations: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set version env
run: echo "CI_VERSION=$(cat server/res/version.txt | awk NF)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log into registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: docker.io
username: seatsurfing
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Build and push
id: push
uses: docker/build-push-action@v4
with:
build-args: CI_VERSION=${{ env.CI_VERSION }}-dev
context: ./
file: Dockerfile.booking-ui
platforms: linux/amd64,linux/arm64
push: true
tags: |
seatsurfing/booking-ui:dev
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Attest
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: index.docker.io/seatsurfing/booking-ui
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true