generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparison betwwen different tags not working where as it compares with default branch #237
Comments
@maazmmd did you manage to figure it out? |
I figured it out. |
Yes I was able to figure out but not using - name: Detect changes in feature branches
uses: ./workflows/actions/com/github/dorny/paths-filter/4512585405083f25c027a35db413c2b3b9006d50
id: changes
if: github.ref_type == 'branch'
with:
base: master
working-directory: repo
filters: |
docs: ['docs/**']
src: ['src/**']
- name: Detect tag changes for [DEPLOYMENTS]
id: tag-changes
if: github.ref_type == 'tag'
working-directory: repo
run: |
set -o xtrace
declare -A paths=(
[docs]='docs/**'
[src]='src/**')
# Get previous tag from a step (Not added here)
git_previous_tag=${{ steps.getversion.outputs.git_previous_tag }}
for key in "${!paths[@]}"; do
changed_files=$(git diff --name-only "${{ github.ref_name }}" "$git_previous_tag" -- ${paths[$key]})
if [ -z "$changed_files" ]; then
echo "$key=false" >> $GITHUB_OUTPUT
else
echo "$key=true" >> $GITHUB_OUTPUT
echo "Changes detected in $key: $changed_files"
fi
done |
Not working, also tried with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
When i run this workflow against
develop/ (i.e merge PR to develop/)
, it compares default branch rather than tagseg:
Changes will be detected between default branch and feature branch
This shows incorrect behaviour. It compare between 2 tags
eg:
Change detection refs/remotes/origin/release/1.10.0...refs/remotes/origin/release/1.10.1
It should be compared between the
tags
and not withdevelop
Here is my workflow file. The issue is on
step: - uses: dorny/[email protected]
The text was updated successfully, but these errors were encountered: