Initial commit
Some checks failed
Composite Actions Test / Test job (push) Failing after 7s

This commit is contained in:
David Boreham 2024-06-14 12:40:39 -06:00
parent 1b6adc3777
commit 2b45f5dbed
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# Composite action shared between several jobs
name: 'Shared action'
description: 'Action shared between several jobs'
inputs:
param1:
description: 'The first parameter'
required: true
outputs:
output-one:
description: 'The output'
value: ${{ steps.second-step.outputs.output-one }}
runs:
using: 'composite'
steps:
- name: 'First step'
run: |
echo "First step here. Param 1 is - ${{ inputs.param1 }}"
run: echo "output-one=this is my output" >> $GITHUB_OUTPUT
shell: bash
- name: 'Second step'
id: 'second-step'
run: |
echo "Second step here"
echo "env var 1 is - ${{ env.ENV_VAR_1 }}"
shell: bash

View File

View File

@ -0,0 +1,20 @@
name: Composite Actions Test
on:
push:
branches:
- '*'
env:
ENV_VAR_1: 'set in top level'
jobs:
test:
name: "Test job"
runs-on: ubuntu-latest
steps:
- name: "Clone project repository"
uses: actions/checkout@v4
- name: "Call composite action"
uses: ./gitea/workflows/lib/shared-action.yml