Skip to content

Commit

Permalink
release pkgs only on changes
Browse files Browse the repository at this point in the history
  • Loading branch information
neferin12 committed Nov 16, 2023
1 parent 3d4065f commit 6ad7331
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/arch_pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,26 @@ name: PKGBUILD CI

on:
push:
tags:
- '*'
branches: [ main ]
workflow_dispatch:

jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
pgkbuild: ${{ steps.filter.outputs.pgkbuild }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
pkgbuild:
- arch_pkgs/**
build-packages:
strategy:
fail-fast: false
Expand Down Expand Up @@ -69,9 +84,9 @@ jobs:
# ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
# allow_empty_commits: false
publish-to-repo:
if: github.event_name != 'pull_request'
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs.pgkbuild == 'true' }}
runs-on: ubuntu-latest
needs: [build-packages]
needs: [build-packages, changes]
container:
image: archlinux:base-devel
steps:
Expand Down

0 comments on commit 6ad7331

Please sign in to comment.