-
Notifications
You must be signed in to change notification settings - Fork 37
57 lines (52 loc) · 1.89 KB
/
acceptance-test.yml
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
name: acceptance-test
on:
repository_dispatch:
types:
- run-acceptance-tests-command
pull_request:
branches:
- master
- main
- v2.0-pre
paths-ignore:
- CHANGELOG.md
workflow_dispatch:
inputs:
short_test:
type: boolean
description: Skip longer running tests
default: false
version:
type: string
description: Override the version when building
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
jobs:
comment-notification:
runs-on: ubuntu-latest
steps:
- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT"
- name: Update with Result
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
body: "Please view the PR build: ${{ steps.vars.outputs.run-url }}"
if: github.event_name == 'repository_dispatch'
version:
if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/dev-version.yml
secrets: inherit
build_test:
if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/build-test.yml
needs: version
with:
ref: ${{ github.ref }}
version: ${{ inputs.version || needs.version.outputs.version }}
short_test: ${{ (github.event_name == 'pull_request' || inputs.short_test) || false }}
retention_days: 30
secrets: inherit