33 questions
0
votes
0
answers
40
views
How to securely pass Vault token obtained via JWT auth in GitHub Actions: composite action vs reusable workflow?
I’m trying to implement a Vault token retrieval using the JWT auth method in a GitHub Actions workflow. I’m evaluating two approaches:
Scenario 1 – Composite Action
Advantage: Token can be retrieved ...
0
votes
0
answers
69
views
Authentication issues when using Re-usable workflow
Here is my current workflow step names and its timings that it takes. I am using actions/create-github-app-token@v1 as recommended.
Checkout code: 1 second
Set up Node.js: 1 second
Calculate ...
1
vote
1
answer
254
views
Combine composite actions from the same repo in GitHub Actions
This is my simplified GitHub Actions workflow structure. I have application repository (app_repo) which has build_and_deploy workflow. This workflow is using reusable workflow from the action_repo, ...
0
votes
0
answers
155
views
Github Actions dynamic "if" condition in the reusable workflow
I'm creating a reusable workflow. I want to implement a dynamic if condition in one of the steps. I want the users to be able to pass a certain input which is evaluated in the if condition, but if the ...
2
votes
1
answer
1k
views
How to configure GitHub dependabot for private repository with reusable workflows?
On GitHub, I use a private repository for reusable workflows and composite actions named private-workflows.
In another private repository, e.g. named project-repo, I use those workflows and actions in ...
0
votes
1
answer
110
views
How to share dependencies installation with reusable workflow in github actions
This is my setup.yml for one reusable workflow
on:
workflow_call:
secrets:
ssh_private_key:
required: true
known_hosts:
required: true
jobs:
setup:
name: '...
-1
votes
1
answer
51
views
Unable to trigger GitHub action with "uses:"
I'm pretty sure I'm misunderstanding something here about how GitHub actions work and would love some help. When this debugging.yml action runs on pull_request it looks to see if any files have ...
0
votes
1
answer
237
views
How to execute multiple commands in this GitHub Actions workflow job?
I am using GitHub Actions workflow for CI/CD. The main workflow uses a reusable workflow to deploy AWS CDK applications. Currently this uses just one command passed into the reusable workflow and ...
1
vote
2
answers
1k
views
Github Actions pipeline running in AWS Codebuild hangs with waiting for runner
I have a reusable workflow that I have created in Github Actions, it uses AWS CodeBuild as a runner i.e.
jobs:
docker:
runs-on: codebuild-XXX-XXX-${{ github.run_id }}-${{ github.run_attempt }}
...
2
votes
0
answers
437
views
How to implement dependent/nested workflows and actions in a shared repo?
Overview
I have a collection of reusable workflows and actions that are needed in multiple repositories. I want to store these in a single "infra" repo.
There is a single entry point, a ...
0
votes
1
answer
384
views
Is it possible to pass optional environment variables to reusable workflows?
I've got about 40 repos that run nearly the same basic Build & Test workflow, and I'd like to make it a reusable workflow.
name: Build & Test
on: [push, pull_request]
jobs:
test:
runs-on:...
0
votes
1
answer
1k
views
Reading a file relative to reusable workflow path
I am trying to access files at relative path to reusable workflow. For example I trying to create following directory structure so that when workflow is called {owner}/{repo}/{path}/{filename}@{ref}, ...
-2
votes
2
answers
692
views
GitHub Actions: Inputs not getting passed to reusable workflow
I'm having trouble passing inputs from my main workflow to a reusable workflow.
I pass a string using with so that I can access it from inputs, and then I supply inputs.myvar to the relevant step as ...
0
votes
0
answers
49
views
GHA reusable workflow succeeds with workflow_dispatch client but fails with push client
I have the following 3 GHA workflows. Note that reusable.yml lives in its own repo:
push-client.yml:
name: Execute on push
on:
push:
jobs:
deploy:
uses: <my-org>/<reusable-...
3
votes
0
answers
74
views
How to integrate sonar qube to docker compose
Right now I have this workflow:
name: Deployment-CI/CD
on:
push:
branches:
- v3.0.0_workflows_single_job
pull_request:
branches:
- "master"
types: [closed]
jobs:
...
1
vote
0
answers
896
views
Hide github variable value being automatically echoed in logs during assignment
I am having a reusable workflow running two separate reusable workflows: a get-variable, which outputs a long string variable and a use-variable. My use-variable workflow is simply looking like this ...
0
votes
0
answers
549
views
Reusable workflows usage across multiple organizations
Consider the below scenario:
sample_one organization has one repository called one_repo
sample_two organization has one repository called two_repo
one_repo has a reusable workflow that needs to be ...
1
vote
1
answer
2k
views
Github Composite Action to run Python script in repo
I have a Python script that scrapes files to search for a regex pattern. I would like to run this script using a Github Action. Furthermore, I want this same action and script to be used in several ...
1
vote
3
answers
1k
views
How can I stop reusable workflows called from a caller workflow in GitHub Actions?
I have a workflow which is calling a reusable workflow. This caller workflow is defined with
name: My CI Pipeline
on:
push:
branches: [ "master" ]
concurrency:
group: ${{ github....
0
votes
0
answers
250
views
Extract matrix step output for each element in a GitHub reusable workflow
I am facing an issue with getting the matrix build output for each step and running something after that, using a GitHub reusable workflow.
jobs:
deploy:
strategy:
matrix:
jdk: [8, ...
1
vote
0
answers
505
views
Need to skip a job based on the result of reusable workflow in Github action
I have a reusable workflow that has 4 jobs in it. Lets say, A, B, C and D.
Now in my caller workflow i have two jobs
Job1 : calls the reusable workflow
Job2 : Comments to PR if any of B, C or D ...
10
votes
1
answer
2k
views
How to avoid jobs name nesting with GitHub Actions reusable workflows?
I have a GH workflow with multiple jobs that are executed after each. These jobs are defined in other files.
name: pipeline
on:
workflow_dispatch:
jobs:
Init:
uses: ./.github/workflows/init....
1
vote
0
answers
50
views
Control workflow and files from a master repo
I would like to use an admin repo, where some Github actions should be developed and some static config files should be set.
The idea is then to use Backstage to use the admin repo as a template.
I ...
1
vote
0
answers
832
views
Github Actions - Unable to get called / checkout reusable workflow's repository
Note: Both the caller and called reusable repo are public and their permissions are correctly set.
Below is my caller repo actions_param workflow test.yml:
name: TEST main xml read
on:
push:
...
1
vote
1
answer
1k
views
Setup environment to use variable context when calling a reusable workflow
I'm trying to make use of variables instead of secrets because some of the secrets are not really secrets so wanted to make it nicer, however, I'm having a bit of a fight here.
The first one runs ok ...
0
votes
1
answer
2k
views
Passing vars using reusable workflow with no success
We try to pass some env variables using a workaround to the reusable workflow as follows, but no variables are passed.
Workflow YAML is:
name: "call my_reusable_workflow"
on:
...
7
votes
0
answers
2k
views
How to access reference in reusable workflow
Context
A reusable workflow in public repos may be called by appending a reference which can be a SHA, a release tag, or a branch name, as for example:
{owner}/{repo}/.github/workflows/{filename}@{ref}...
2
votes
0
answers
606
views
Reuse build phase from Github action in order to run tests in parallel actions
I have a github action that has a build phase that installs some libraries, then builds the project, then runs some tests. Concretely it looks like:
jobs:
build:
runs-on: ubuntu-latest
steps:...
1
vote
0
answers
686
views
GitHub Actions: Cannot inherit secrets using reusable workflows
The Github actions documentation on reusable workflows specifies the syntax to pass secrets from caller workflow to the called workflow using the secrets: inherit tag. However, when I copy this I get ...
2
votes
1
answer
6k
views
Unable to access repository secrets in reusable workflows
I have a scan tool that is being run manually using workflow_dispatch event. Now I want to use it automatically for all other repos. So I went with reusable workflows. But I'm getting issues there. I ...
2
votes
2
answers
4k
views
GitHub Actions triggering workflow from another workflow
I have a GitHub repository (repo A) with a workflow running inside that repo (working with Terraform file and applying them on AWS). I am trying to trigger that workflow from a different GitHub ...
2
votes
1
answer
677
views
Github reusable workflow with schedule as trigger does not work
I have a simple workflow that calls a reusable workflow to build a container image. In my case the job won't start as scheduled at all. I know the trigger schedule will only work from the master ...
2
votes
1
answer
1k
views
Cannot access env vars in `with` of shared-workflow invocation?
I need to maintain a default that will be used for PRs and workflow_dispatch. Following is the pattern I'm trying to use, but I get an error when trying to access the env.var. How am I going wrong ...