Displayed GitHub Action name doesn't match name in workflow file - github-actions

We have a workflow that runs whenever a tag with a specific format is pushed to the main repository. Originally, the displayed name is consistent with the name: entry at the beginning of the workflow file, but this is no longer the case.
Before this change, we had a separate repository with a cron workflow that ran a python script to push the tag to the main repository, which triggers the workflow there.
We recently moved to using a workflow from the main repository to push the tag, and this is when the different workflow display name changed. There are some differences between the two triggering workflows. The old trigger ran a python script which presumably pushed the tags "from" the script. The new trigger explicitly calls git push --tags from the workflow file itself.
I believe the move to the new trigger is why the display name is changed, but I cannot be certain.

Related

How to conditionally trigger a Github Workflow based which directory a change is pushed to?

This is from the Github Workflow Documentation:
You can exclude paths using the ! character. The order that you define patterns matters:
A matching negative pattern (prefixed with !) after a positive match will exclude the path.
A matching positive pattern after a negative match will include the path again.
This example runs anytime the push event includes a file in the sub-project directory or its subdirectories, unless the file is in the sub-project/docs directory. For example, a push that changed sub-project/index.js or sub-project/src/index.js will trigger a workflow run, but a push changing only sub-project/docs/readme.md will not.
on:
push:
paths:
- 'sub-project/**'
- '!sub-project/docs/**'
I understand that if a change is pushed only in sub-project/docs/** path, the workflow will not trigger.
With the current setup, the workflow will be triggered when a change is pushed in sub-project/** irrespective of the fact that if a change is pushed in any of the ! paths or not.
I am trying to find a way to trigger (or not trigger) a workflow based on the following condition:
Trigger the workflow if a change is pushed in sub-project/**. However, do not trigger the workflow if a change is pushed in any of the paths denoted by ! in the same commit. Is there a way to trigger the flow based on the above condition?

Which branch should workflow files be located on for GitHub Actions to execute them?

I have created on my main branch with
on:
push:
branches: [ test ]
I have noticed, that while I can trigger it manually, and it will work, it will not actually trigger if I push to test. For that, I needed to create that same action file on test. Now, it seems like I don't even need to have the action on the main branch, is that correct?
So why does even the option so specify the branch that it should trigger on exist? It only triggers on the branches the file exists anyway. That said, I found it frustrating that I have to merge my one file from main to my test branch, is there a way to trigger the action automatically on push even if I do not have it on my test branch, only on main?
No, it's not possible. The order of operations in a workflow run triggered by push or pull request is described in the reference documentation:
An event occurs on your repository. The event has an associated commit SHA and Git ref.
GitHub searches the .github/workflows directory in your repository for workflow files that are present in the associated commit SHA or Git ref of the event.
A workflow run is triggered for any workflows that have on: values that match the triggering event. Some events also require the workflow file to be present on the default branch of the repository in order to run.

The Actions tab shows workflows created in main branche's /.github/workflows/ only

The Actions tab shows workflows created in main branche's /.github/workflows/ only
I have workflow.yml files with workflow_dispatch trigger that are defined in another branch (test) that are not yet merged into the main branch
Is there any way I can see and run workflows with workflow_dispatch trigger that are created in another branch not yet merged with the main branch?
It looks that you can't change at the moment. It takes actions from default branch. You can change default branch but I assume that this is not acceptable for you (which I understand). Please take a look here on github community -
Workflow files only picked up from master?
If you use a web browser, you will see a dropdown - Use workflow from
If you use GitHub CLI, you need to use --ref flag
gh.exe workflow run workflown_name --ref branch_name -f param_name=value
documentation is here

"Page build failed" after auto merging pull request to GitHub-Pages master branch

The comments system on my Github Pages blog (https://github.com/artandsuffering/artandsuffering.github.io) creates each comment on a new branch and then creates a pull request to merge the branch to master. If I commit the request myself, the page rebuilds and works fine. But I want the requests to merge without me having to do anything, so I've tried a few Github apps like Mergify to automate the process. Mergify successfully merges the requests, but the blog doesn't update, and in my GitHub Pages settings I get a "Page build failed" notification.
If I make a small change, like add a space to one of my SCSS files, and commit, the blog builds and updates fine. How can I automatically merge pull requests and have my blog build properly? My .mergify.yml looks like this:
pull_request_rules:
- name: automatic merge on CI success
conditions:
- author=artandsuffering
- base=master
actions:
merge:
method: merge
delete_head_branch: {}

can we control which directories trigger a `lein auto` cycle

Can we elegantly control which directories trigger a lein auto cycle?
I might want a test run triggered whenever a resource file changes, or when a file under a custom source path or a under a :java-source-paths changes, and so on. Even trigger a cycle when the project file changes.
Last I checked I think there was no lead towards this, in the sample project file contained in the leiningen source. Since I like leiningen so much, I thought I would ask.