pulumi/.github/workflows/on-pr.yml

87 lines
2.2 KiB
YAML

name: Pull Request
permissions:
contents: write
pull-requests: write
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changelog-comment:
name: changelog preview
permissions:
contents: read
pull-requests: write
uses: ./.github/workflows/on-pr-changelog.yml
with:
ref: ${{ github.ref }}
base-ref: origin/${{ github.base_ref }}
pr-number: ${{ github.event.pull_request.number }}
changelog-required: ${{ !contains(github.event.pull_request.labels.*.name, 'impact/no-changelog-required') }}
secrets: inherit
info:
name: info
uses: ./.github/workflows/ci-info.yml
permissions:
contents: read
with:
ref: ${{ github.ref }}
is-snapshot: true
secrets: inherit
ci:
name: CI
needs: [info]
uses: ./.github/workflows/ci.yml
permissions:
contents: read
with:
ref: ${{ github.ref }}
version: ${{ needs.info.outputs.version }}
# TODO: make these condition on ci/test check
lint: false
unit-test: false
integration-test: false
test-platforms: '["ubuntu-latest"]'
macos-build-platform: ubuntu-latest
secrets: inherit
prepare-release:
name: prepare
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/test') }}
needs: [info, ci]
uses: ./.github/workflows/ci-prepare-release.yml
permissions:
contents: write
with:
ref: ${{ github.ref }}
version: ${{ needs.info.outputs.version }}
release-notes: ${{ needs.info.outputs.release-notes }}
project: ${{ github.repository }}
draft: false
prerelease: true
secrets: inherit
release:
name: release
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/test') }}
needs: [info, prepare-release]
uses: ./.github/workflows/release.yml
permissions:
contents: write
pull-requests: write
with:
ref: ${{ github.ref }}
version: ${{ needs.info.outputs.version }}
next-version: ${{ needs.info.outputs.next-version }}
release-notes: ${{ needs.info.outputs.release-notes }}
queue-merge: false
secrets: inherit