-
I'm using My action definition so far: My example PR that should trigger the changes: Action results - didn't find any changes, but it should as there is a change to a Dockerfile file: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi, @rafrafek. This is already supported, so you wouldn't need to calculate the To accomplish this, you will need to set the input name: ci
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
permissions:
contents: read
packages: write
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.prepare.outputs.matrix }}
length: ${{ steps.prepare.outputs.length }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: true
files: |
**/Dockerfile
- name: Prepare
id: prepare
shell: python
run: |
... Excerpt from the docs # -----------------------------------------------------------------------------------------------------------
# Example 1
# -----------------------------------------------------------------------------------------------------------
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
# with:
# since_last_remote_commit: true For more details see the inputs section in the documentation. |
Beta Was this translation helpful? Give feedback.
Hi, @rafrafek. This is already supported, so you wouldn't need to calculate the
BASE_SHA.
To accomplish this, you will need to set the input
since_last_remote_commit
totrue
.