From 2b45f5dbed7a1d63a79bd05d607b6de39324683f Mon Sep 17 00:00:00 2001 From: David Boreham Date: Fri, 14 Jun 2024 12:40:39 -0600 Subject: [PATCH] Initial commit --- .gitea/workflows/lib/shared-action.yml | 25 +++++++++++++++++++++++++ .gitea/workflows/second-job.yml | 0 .gitea/workflows/test-job.yml | 20 ++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .gitea/workflows/lib/shared-action.yml create mode 100644 .gitea/workflows/second-job.yml create mode 100644 .gitea/workflows/test-job.yml diff --git a/.gitea/workflows/lib/shared-action.yml b/.gitea/workflows/lib/shared-action.yml new file mode 100644 index 0000000..0ee2187 --- /dev/null +++ b/.gitea/workflows/lib/shared-action.yml @@ -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 diff --git a/.gitea/workflows/second-job.yml b/.gitea/workflows/second-job.yml new file mode 100644 index 0000000..e69de29 diff --git a/.gitea/workflows/test-job.yml b/.gitea/workflows/test-job.yml new file mode 100644 index 0000000..d921ebf --- /dev/null +++ b/.gitea/workflows/test-job.yml @@ -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 +