mirror of
https://github.com/onedr0p/exportarr.git
synced 2026-02-06 10:57:32 +00:00
Separate PR & Merge Workflows (#225)
Signed-off-by: Russell Troxel <russell@troxel.io>
This commit is contained in:
parent
b8b7cc6be3
commit
4d71594773
9
.github/actions/docker-image/action.yaml
vendored
9
.github/actions/docker-image/action.yaml
vendored
@ -6,6 +6,11 @@ inputs:
|
||||
token:
|
||||
description: Github token
|
||||
required: true
|
||||
push:
|
||||
description: Push Images to GHCR
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@ -39,14 +44,14 @@ runs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ inputs.token }}
|
||||
|
||||
- name: Build and Push
|
||||
- name: Build Docker Image
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
push: ${{ fromJSON(inputs.push) }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
---
|
||||
name: ci
|
||||
name: On Merge
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
@ -21,8 +18,6 @@ jobs:
|
||||
|
||||
release-image:
|
||||
runs-on: ubuntu-latest
|
||||
needs: tests
|
||||
if: github.event_name == 'push' && github.ref_name == 'master'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
19
.github/workflows/on-pr.yml
vendored
Normal file
19
.github/workflows/on-pr.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
name: On Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
|
||||
- name: Tests
|
||||
uses: ./.github/actions/tests
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
name: release
|
||||
name: Versioned Release
|
||||
|
||||
on:
|
||||
push:
|
||||
Loading…
Reference in New Issue
Block a user