Skip to content

Instantly share code, notes, and snippets.

@minaf1
Last active August 23, 2021 23:13
Show Gist options
  • Save minaf1/3c46dca83c62b976d98d17ebe5c860e8 to your computer and use it in GitHub Desktop.
Save minaf1/3c46dca83c62b976d98d17ebe5c860e8 to your computer and use it in GitHub Desktop.
composite job in one repository & workflow from a different repo
name: 'gh-actions'
description: ''
inputs:
secret:
description: "use a secret in a diff repo"
required: true
default: "null"
runs:
using: "composite"
steps:
- name: run a pipeline
run: echo "${{ inputs.secret }}"
shell: bash
name: workflow-test
on:
push:
jobs:
run-workflow-job:
name: Run workflow
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
repository: minaf1/GitHubActions
ref: v1
token: ${{ secrets.TOKEN }}
path: ./
- name: Run my action
uses: ./.github/actions/my-action
with:
secret: "The value is: ${{ secrets.MY_SECRET }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment