-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 2.17 KB
/
generate-build-infos.yml
File metadata and controls
64 lines (61 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Generate infos for PR
on:
workflow_call:
inputs:
prnumber:
description: "send the pullrequest number (optional)"
default: ${{ github.event.pull_request.number }}
required: false
type: string
secrets:
token:
required: true
outputs:
pr:
description: "returns the pullrequest number"
value: ${{ jobs.generate_infos.outputs.pr }}
sha:
description: "returns the sha from pull request"
value: ${{ jobs.generate_infos.outputs.sha }}
repo:
description: "returns the repo name"
value: ${{ jobs.generate_infos.outputs.repo }}
owner:
description: "returns the owner"
value: ${{ jobs.generate_infos.outputs.owner }}
sha-short:
description: "returns the short sha from pull request"
value: ${{ jobs.generate_infos.outputs.sha-short }}
version:
description: "returns the version to build"
value: ${{ jobs.generate_infos.outputs.version }}
latest-version:
description: "returns the version to build"
value: ${{ jobs.generate_infos.outputs.latest-version }}
next-version:
description: "returns the version to build"
value: ${{ jobs.generate_infos.outputs.next-version }}
jobs:
generate_infos:
runs-on: ubuntu-latest
outputs:
pr: ${{ steps.tag.outputs.ACI_PR }}
sha: ${{ steps.tag.outputs.ACI_PR_SHA }}
repo: ${{ steps.tag.outputs.ACI_REPO }}
owner: ${{ steps.tag.outputs.ACI_OWNER }}
sha-short: ${{ steps.tag.outputs.ACI_PR_SHA_SHORT }}
version: ${{ steps.tag.outputs.ACI_LATEST_VERSION }}-pr-${{ steps.tag.outputs.ACI_PR }}
latest-version: ${{ steps.tag.outputs.ACI_LATEST_VERSION }}
next-version: ${{ steps.tag.outputs.ACI_NEXT_VERSION }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup awesome-ci
uses: fullstack-devops/awesome-ci-action@main
- name: collect infos
id: tag
run: awesome-ci pr info -n ${{ inputs.prnumber }} > $GITHUB_STEP_SUMMARY
env:
GITHUB_TOKEN: ${{ secrets.token }}