Bumps the actions group with 6 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `3` | `4` | | [actions/cache](https://github.com/actions/cache) | `3` | `4` | | [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) | `2` | `3` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `3` | `4` | | [Apple-Actions/import-codesign-certs](https://github.com/apple-actions/import-codesign-certs) | `2` | `3` | | [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `0.1.15` | `2.0.5` | Updates `actions/checkout` from 3 to 4 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) Updates `peter-evans/repository-dispatch` from 2 to 3 - [Release notes](https://github.com/peter-evans/repository-dispatch/releases) - [Commits](https://github.com/peter-evans/repository-dispatch/compare/v2...v3) Updates `actions/download-artifact` from 3 to 4 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) Updates `Apple-Actions/import-codesign-certs` from 2 to 3 - [Release notes](https://github.com/apple-actions/import-codesign-certs/releases) - [Commits](https://github.com/apple-actions/import-codesign-certs/compare/v2...v3) Updates `softprops/action-gh-release` from 0.1.15 to 2.0.5 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v0.1.15...v2.0.5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: peter-evans/repository-dispatch dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: Apple-Actions/import-codesign-certs dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
67 lines
2.4 KiB
YAML
67 lines
2.4 KiB
YAML
name: Preview push
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- synchronize
|
|
|
|
jobs:
|
|
check_new_preview:
|
|
name: Check preview needs update
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- name: Check if earlier preview exists
|
|
id: earlier_preview
|
|
uses: octokit/request-action@v2.x
|
|
with:
|
|
route: GET /repos/{owner}/{repo}/deployments
|
|
owner: ${{ github.event.repository.owner.login }}
|
|
repo: ${{ github.event.repository.name }}
|
|
environment: preview-pr-${{ github.event.number }}
|
|
per_page: 1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
|
|
|
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]'
|
|
name: Check for preview label
|
|
id: preview_label
|
|
uses: octokit/request-action@v2.x
|
|
with:
|
|
route: GET /repos/{owner}/{repo}/issues/{issue_number}/labels
|
|
owner: ${{ github.event.repository.owner.login }}
|
|
repo: ${{ github.event.repository.name }}
|
|
issue_number: ${{ github.event.number }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
|
|
|
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]' && contains(fromJson(steps.preview_label.outputs.data).*.name, 'preview')
|
|
name: Create deployment
|
|
id: deployment
|
|
uses: octokit/request-action@v2.x
|
|
with:
|
|
route: POST /repos/{owner}/{repo}/deployments
|
|
mediaType: |
|
|
previews:
|
|
- ant-man
|
|
- flash
|
|
owner: ${{ github.event.repository.owner.login }}
|
|
repo: ${{ github.event.repository.name }}
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
task: deploy:preview
|
|
auto_merge: false
|
|
required_contexts: "[]"
|
|
environment: preview-pr-${{ github.event.number }}
|
|
description: "Preview for Pull Request #${{ github.event.number }}"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
|
|
|
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]' && contains(fromJson(steps.preview_label.outputs.data).*.name, 'preview')
|
|
name: Trigger 'preview build'
|
|
uses: peter-evans/repository-dispatch@v3
|
|
with:
|
|
token: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
|
event-type: "Preview build #${{ github.event.number }}"
|
|
client-payload: '{"folder": "pr${{ github.event.number }}", "sha": "${{ github.event.pull_request.head.sha }}", "deployment_id": "${{ fromJson(steps.deployment.outputs.data).id }}"}'
|