add pr build

This commit is contained in:
jr-k 2024-08-08 03:06:00 +02:00
parent 671e402db4
commit 55ea9e5963
3 changed files with 45 additions and 2 deletions

View File

@ -1,4 +1,4 @@
name: Nightly build synced with develop and push docker images
name: Nightly build synced with develop and push docker image
on:
schedule:

43
.github/workflows/pr-build.yml vendored Executable file
View File

@ -0,0 +1,43 @@
name: Pull-Request build and push ghcr image
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
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.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.number }}

View File

@ -1,4 +1,4 @@
name: Release build and push docker images
name: Release build and push docker image
on:
push: