Skip to content

Fix formatting of course chat pipeline #584

Fix formatting of course chat pipeline

Fix formatting of course chat pipeline #584

Workflow file for this run

name: Build
on:
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/build.yml'
- '!.github/workflows/deploy.yml'
- '!.github/workflows/deploy-test.yml'
push:
branches:
- main
tags: '[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/build.yml'
- '!.github/workflows/deploy.yml'
release:
types:
- created
jobs:
docker:
name: Build and Push Docker Image
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'ls1intum/Pyris' }}
runs-on: ubuntu-latest
steps:
- name: Compute Tag
uses: actions/github-script@v7
id: compute-tag
with:
result-encoding: string
script: |
if (context.eventName === "pull_request") {
return "pr-" + context.issue.number;
}
if (context.eventName === "release") {
return "latest";
}
if (context.eventName === "push") {
if (context.ref.startsWith("refs/tags/")) {
return context.ref.slice(10);
}
if (context.ref === "refs/heads/main") {
return "latest";
}
}
return "FALSE";
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Build and Push to GitHub Container Registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ steps.compute-tag.outputs.result != 'FALSE' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v6
if: ${{ steps.compute-tag.outputs.result != 'FALSE' }}
with:
platforms: amd64, arm64
file: ./Dockerfile
context: .
tags: ghcr.io/ls1intum/pyris:${{ steps.compute-tag.outputs.result }}
push: true