Skip to content

Build PR

Build PR #516

Workflow file for this run

name: Build PR
on:
pull_request_review:
types: [submitted]
jobs:
build:
name: Build PR container
if: github.repository == 'xibosignage/xibo-cms' && github.event.review.state == 'APPROVED'
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Configure Build X
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Container
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ci
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/xibosignage/xibo-cms:test-${{ github.event.pull_request.number }}
build-args: GIT_COMMIT=${{ github.event.head.sha }}
push: true
load: false