generated from platform-mesh/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (68 loc) · 1.95 KB
/
build_verify.yml
File metadata and controls
74 lines (68 loc) · 1.95 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
65
66
67
68
69
70
71
72
73
74
name: "🔍 OCM: Build & Verify"
run-name: >-
${{ github.event_name == 'workflow_dispatch'
&& format('Manual Package & Verify')
|| format('Automatic Package & Verify') }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
workflow_dispatch: {}
pull_request:
branches:
- main
permissions:
pull-requests: write
contents: write
packages: write
actions: write
checks: write
statuses: write
env:
DOMAIN: "opendesk.internal"
jobs:
expose-env-vars:
name: Expose Environment Variables
runs-on: [ubuntu-latest]
outputs:
domain: ${{ env.DOMAIN }}
steps:
- run: echo "domain=${{ env.DOMAIN }}"
get-version:
name: Get OCM Version
uses: ./.github/workflows/re-get-version.yml
find-constructors:
name: Find Component Constructors
uses: ./.github/workflows/re-find-constructors.yml
publish-ocm:
name: Publish OCM Packages
needs:
- get-version
- find-constructors
uses: ./.github/workflows/re-publish-ocm.yaml
with:
files: ${{ needs.find-constructors.outputs.files }}
dry-run: true
version: ${{ needs.get-version.outputs.version }}
oci_registry: ghcr.io
secrets:
oci_reg_username: ${{ github.actor }}
oci_reg_password: ${{ secrets.GITHUB_TOKEN }}
set-pr-status:
name: Set PR Status
if: ${{ github.event_name == 'pull_request' }}
needs:
- publish-ocm
runs-on: [ubuntu-latest]
steps:
- name: Get commit SHA
run: echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
- name: Set commit status
uses: myrotvorets/set-commit-status-action@master
if: always()
with:
allowForks: true
status: ${{ job.status }}
sha: ${{ env.commit }}
targetUrl: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
context: OCM Build & Verify