|
| 1 | +name: Create release |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + secrets: |
| 6 | + token: |
| 7 | + required: true |
| 8 | + outputs: |
| 9 | + release-id: |
| 10 | + description: "returns the pullrequest number" |
| 11 | + value: ${{ jobs.generate_infos.outputs.release-id }} |
| 12 | + sha: |
| 13 | + description: "returns the sha from pull request" |
| 14 | + value: ${{ jobs.generate_infos.outputs.sha }} |
| 15 | + repo: |
| 16 | + description: "returns the repo name" |
| 17 | + value: ${{ jobs.generate_infos.outputs.repo }} |
| 18 | + owner: |
| 19 | + description: "returns the owner" |
| 20 | + value: ${{ jobs.generate_infos.outputs.owner }} |
| 21 | + sha-short: |
| 22 | + description: "returns the short sha from pull request" |
| 23 | + value: ${{ jobs.generate_infos.outputs.sha-short }} |
| 24 | + version: |
| 25 | + description: "returns the version to build" |
| 26 | + value: ${{ jobs.generate_infos.outputs.version }} |
| 27 | + |
| 28 | +jobs: |
| 29 | + generate_infos: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + outputs: |
| 32 | + sha: ${{ steps.tag.outputs.sha }} |
| 33 | + repo: ${{ steps.tag.outputs.repo }} |
| 34 | + owner: ${{ steps.tag.outputs.owner }} |
| 35 | + version: ${{ steps.tag.outputs.version }} |
| 36 | + sha-short: ${{ steps.tag.outputs.sha-short }} |
| 37 | + release-id: ${{ steps.tag.outputs.release-id }} |
| 38 | + steps: |
| 39 | + - name: Check out the repo |
| 40 | + uses: actions/checkout@v2 |
| 41 | + - name: Setup awesome-ci |
| 42 | + uses: fullstack-devops/awesome-ci-action@main |
| 43 | + |
| 44 | + - name: create release |
| 45 | + run: awesome-ci release create -merge-sha ${{ github.sha }} |
| 46 | + env: |
| 47 | + GITHUB_TOKEN: ${{ secrets.token }} |
| 48 | + - name: export infos |
| 49 | + id: tag |
| 50 | + shell: bash |
| 51 | + run: | |
| 52 | + echo "::set-output name=version::${ACI_VERSION}" |
| 53 | + echo "::set-output name=release-id::$ACI_RELEASE_ID" |
| 54 | + echo "::set-output name=sha::$ACI_PR_SHA" |
| 55 | + echo "::set-output name=sha-short::$ACI_PR_SHA_SHORT" |
| 56 | + echo "::set-output name=owner::$ACI_OWNER" |
| 57 | + echo "::set-output name=repo::$ACI_REPO" |
0 commit comments