48 lines
1.2 KiB
YAML
Executable File
48 lines
1.2 KiB
YAML
Executable File
name: PR build and push ghcr image
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, labeled]
|
|
push:
|
|
branches-ignore:
|
|
- master
|
|
- develop
|
|
- nightly
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.user.login == 'jr-k' || contains(github.event.pull_request.labels.*.name, 'build-pr')
|
|
|
|
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: jr-k
|
|
password: ${{ secrets.GA_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 }}
|