Skip to content

Commit

Permalink
Fix get-changed-files (#1)
Browse files Browse the repository at this point in the history
* add test echo statements

* be more explicit in push run scenarios to avoid running on pushes to PR branches
  • Loading branch information
nicholasmhughes authored Dec 29, 2023
1 parent beb1579 commit ba30e9c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/get-changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
changed-files: ${{ toJSON(steps.changed-files.outputs) }}
steps:
- uses: actions/checkout@v4

- name: Get Changed Files
id: changed-files
uses: dorny/paths-filter@v2
Expand All @@ -25,3 +26,9 @@ jobs:
deleted:
- deleted:
- '**'
- name: Echo GitHub Ref
run: echo "${{ github.ref }} ${{ github.ref_name }}"

- name: Echo Changed Files Output
run: echo "${{ toJSON(steps.changed-files.outputs) }}"
12 changes: 0 additions & 12 deletions .github/workflows/pipeline.yml

This file was deleted.

28 changes: 15 additions & 13 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Pull Request or Push

# on: [push, pull_request]
on:
workflow_call:
inputs:
changed-files:
required: true
type: string
description: JSON string containing information about changed files
push:
branches:
- 'main' # Run on pushes to main even though we shouldn't do this
tags-ignore:
- '*' # Ignore pushes to tags
pull_request:

jobs:
ci:
name: CI
uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main
permissions:
contents: write
pull-requests: read
call-get-changed-files:
uses: salt-extensions/central-artifacts/.github/workflows/get-changed-files.yml@main

call-pre-commit-action:
uses: salt-extensions/central-artifacts/.github/workflows/pre-commit-action.yml@main
needs:
- call-get-changed-files
with:
changed-files: ${{ needs.call-get-changed-files.outputs.changed-files }}

0 comments on commit ba30e9c

Please sign in to comment.