hellofresh / action-changed-files Goto Github PK
View Code? Open in Web Editor NEWGitHub Action for matrix generation based on changed files matched against regular expressions
License: Apache License 2.0
GitHub Action for matrix generation based on changed files matched against regular expressions
License: Apache License 2.0
This repo is running an older version of checkout
https://github.com/actions/checkout/releases/tag/v3.1.0
If a pull-request contains deletions, the script isn't equipped to not generate a job matrix entry for this match.
The logic might be a bit tricky to implement properly, so we need to be extra careful.
To use the native approach of GitHub Actions, which also gives us an authenticated Octokit
client and fits better in the ecosystem in general.
From #18, it will make it easier if you just get dependabot to sort out the version bump PRs for the github actions used in your workflows
With PRs container many file changes, the list return by https://api.github.com/repos/{args.github_repository}/compare/{quote_plus(args.github_base_ref)}...{quote_plus(args.github_head_ref)}
is cut off, if pagination is not enabled. Would it be possible to support pagination, as described here?
Hi, I've been running the latest version of your job. It seems that using set-output
is deprecated and will be deleted soon. It would make this action unusable. Find the warning below:
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
pattern
and default-patterns
When the pattern
regexp doesn't contain any named group definition, the matrix will be generated with the path
field instead.
Hello, I am running the matrix generation job on a folder containing ~240 sub-folders. I am pushing all the folders in one commit.
The matrix generation job is only outputting the first ~140 folders even though all of them are being added.
Is there a limit on the number of outputs ?
This is a bug where an HTTPError 404 is being returned when attempting to make a request to the GitHub API for a repository comparison using the base commit "0000000000000000000000000000000000000000". The error message indicates that the requested resource could not be found on the server. The reason for this error is likely due to the fact that the base commit specified is incorrect. "0000000000000000000000000000000000000000" is a null sha1 hash, this means that the commit doesn't exist in the repository and thus it's impossible to compare it with a valid commit sha1 hash.
It's a common mistake when working with git, when specifying a base commit sha1 hash that doesn't exist in the repository it will lead to this error.
INFO:root:GitHub API request: https://api.github.com/repos/org/repo/compare/0000000000000000000000000000000000000000...48adb89ed9d007de9279ee10f3e693726d099de6
Traceback (most recent call last):
File "/home/runner/work/_actions/hellofresh/action-changed-files/v3/neo/neo.py", line 245, in <module>
matrix = main(**args)
File "/home/runner/work/_actions/hellofresh/action-changed-files/v3/neo/neo.py", line 132, in main
r = session.get(compare_url)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 662, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File "/usr/lib/python3/dist-packages/requests/hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/home/runner/work/_actions/hellofresh/action-changed-files/v3/neo/neo.py", line 119, in <lambda>
"response": lambda resp, *resp_args, **kwargs: resp.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.github.com/repos/org/repo/compare/0000000000000000000000000000000000000000...48adb89ed9d007de9279ee10f3e693726d099de6
Hi.
I'm trying to execute sample workflow via Act, but getting error about missing request module.
name: Sample workflow
on:
pull_request:
branches:
- master
jobs:
generate-matrix:
name: Generate job matrices
runs-on: ubuntu-latest
outputs:
matrix-python-lib: ${{ steps.neo-python.outputs.matrix }}
steps:
- name: Generate matrix | Infrastructure
id: neo-python
uses: hellofresh/action-changed-files@v3
with:
pattern: ^\w+/python/(?P<environment>[^/]+)
default-patterns: |
schellar/python
[Sample workflow/Generate job matrices] ๐ณ docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/neo-python-composite-neo.sh] user= workdir=
| Traceback (most recent call last):
| File "/var/run/act/actions/hellofresh-action-changed-files@v3/neo/neo.py", line 8, in
| import requests
| ModuleNotFoundError: No module named 'requests'
I'm seeing warnings in workflows where I'm using action-changed-files
related to the usage of node16 in actions/checkout@v3
. I see it's used here
Would the maintainers be open to a PR creating updating the checkout action to v4? I'm happy to do it.
I'm also wondering if we could remove the checkout action all together from this composite action. I would prefer the parent workflow be responsible for checking out the repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.