obscreen/.github/workflows/pr-build.yml
2024-08-08 03:19:49 +02:00

46 lines
1.1 KiB
YAML
Executable File

name: Pull-Request build and push ghcr image
permissions:
contents: read
packages: write
on:
repository_dispatch:
types: [build-pr]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/obscreen:pr-${{ github.event.client_payload.pr_number }}
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7
- name: Create and push manifest
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository_owner }}/obscreen
tags: pr-${{ github.event.client_payload.pr_number }}