Questions tagged [github-actions-reusable-workflows]

18 questions
5
votes
0 answers

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} Githubs documentation states: When a reusable…
Kay
  • 624
  • 1
  • 7
  • 17
2
votes
2 answers

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 repository (repo B), so I created a workflow in repo B,…
1
vote
1 answer

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 have the following repo, that I want to be either…
1
vote
0 answers

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: branches: main jobs: inside_actionyml: …
Ashar
  • 2,942
  • 10
  • 58
  • 122
1
vote
1 answer

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 because I'm able to use the environment: name:…
1
vote
0 answers

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: # install deps. - name: install…
martin
  • 31
  • 1
  • 2
1
vote
0 answers

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 an error saying Unexpected value 'inherit' Does…
1
vote
1 answer

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 branch on the repo executing the workflow and we have…
1
vote
1 answer

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 here and how else might I achieve the same…
0
votes
2 answers

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.ref }} cancel-in-progress: true jobs: ... When I push…
du-it
  • 2,561
  • 8
  • 42
  • 80
0
votes
0 answers

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, 11, 14, . . .] # User provides this value as…
0
votes
0 answers

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 succeeded . If all B, C and D skipped, I want Job 2 to…
ASHISH M.G
  • 522
  • 2
  • 7
  • 23
0
votes
0 answers

Is it possible to share secrets, variables and reuse workflows in private organization with GitHub Team plan?

Currently I use free plan for my organization, where each repo is private(and will remain such). My goal is to share secrets and variables over my organization and reuse workflows, instead of copying the workflow code and secrets into each…
0
votes
0 answers

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.yml secrets: inherit with: ... …
Christopher
  • 1,103
  • 1
  • 6
  • 18
0
votes
0 answers

Can I create a caller workflow with on.manual_dispatch that presents the input context from the called workflow directly to the user?

I have a reusable workflow that uses input.choice (and other inputs) which will likely need to change again and again. This workflow is called from a bunch of other repos with caller worklflows that use on.workflow_dispatch. I know how to use…
1
2