-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (45 loc) · 1.18 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
paths-ignore:
- docs/*
- docs/sources/**
branches:
- main
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{secrets.BUNDLEWATCH_GITHUB_TOKEN}}
# Required to create OIDC/JWT token required to use shared actions
permissions:
contents: read
pull-requests: write
id-token: write
jobs:
build:
name: Build and test
uses: ./.github/workflows/build.yml
with:
version: ${{ github.event.pull_request.head.sha || github.sha }}
package:
name: Package
needs: [build]
uses: ./.github/workflows/package.yml
secrets: inherit
with:
version: ${{ github.event.pull_request.head.sha || github.sha }}
github_environment: ${{ github.event_name != 'push' && 'gcs' || 'gcs-no-approval' }}
deploy-main-to-dev-and-ops:
name: Deploy
needs: [package]
uses: ./.github/workflows/deploy.yml
# Make deployments available only from main
if: github.event_name == 'push'
secrets: inherit
strategy:
matrix:
environment: [dev, ops]
with:
version: ${{ github.event.pull_request.head.sha || github.sha }}
environment: ${{ matrix.environment }}