forked from canonical/cloud-init
-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (119 loc) · 4.14 KB
/
main.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Main Workflow of eQuantum Project
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Build and deploy eQuantum site
# Runs on workflow_run.conclusion
on:
push:
paths:
- '.github/**'
- '!**/reserves/**'
workflow_run:
types: [completed]
workflows: ["pages-build-deployment"]
# Allow concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
# Set GITHUB_TOKEN scopes
permissions: write-all
# Global environtment variables
env:
RUN: ${{ github.run_id }}
USER: ${{ github.actor }}
REPO: ${{ github.repository }}
OWNER: ${{ github.repository_owner }}
ACTOR: ${{ github.triggering_actor }}
jobs:
determine-runner:
runs-on: ubuntu-latest
#container: node:latest
services:
postgres:
image: postgres
ports: ['5432:5432']
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
outputs:
runner: ${{ steps.set-runner.outputs.use-runner }}
steps:
- name: 📂 Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
#repository: ${{ env.OWNER }}/${{ env.OWNER }}.github.io
- name: 🪂 Pre-build Maps
#if: runner.os == 'Windows'
uses: eq19/maps@v2
with:
image_name: "prime"
image_tag: "latest"
token: ${{ secrets.ACCESS_TOKEN }}
docker_hub_username: ${{ github.actor }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: 🚀 Build Feed on Linux
uses: eq19/feed@v3
with:
credentials: ${{ secrets.GCP_CREDENTIALS }}
- name: 🔧 Setup Lexer on Cloud
uses: eq19/lexer@v1
id: set-runne
with:
repository: ${{ github.repository }}
token: ${{ secrets.ACCESS_TOKEN }}
credentials: ${{ secrets.GCP_CREDENTIALS }}
github-pages:
defaults:
run:
shell: bash
needs: determine-runner
strategy:
max-parallel: 1
fail-fast: false
matrix:
#node_version: [8, 10, 12]
os: [windows-latest, self-hosted]
mocha-args-windows: [
# "src/test/cli.build.test.ts",
# "src/test/cli.exec.buildKit.1.test.ts",
# "src/test/cli.exec.buildKit.2.test.ts",
# "src/test/cli.exec.nonBuildKit.1.test.ts",
# "src/test/cli.exec.nonBuildKit.2.test.ts",
# "src/test/cli.test.ts",
# "src/test/cli.up.test.ts",
"src/test/container-features/containerFeaturesOCI.test.ts",
# "src/test/container-features/containerFeaturesOCIPush.test.ts",
# "src/test/container-features/containerFeaturesOrder.test.ts",
# "src/test/container-features/e2e.test.ts",
# "src/test/container-features/featureHelpers.test.ts",
# "src/test/container-features/featuresCLICommands.test.ts",
#"src/test/container-features/generateFeaturesConfig.test.ts",
# "src/test/container-templates/containerTemplatesOCI.test.ts",
# "src/test/container-templates/templatesCLICommands.test.ts",
# "src/test/dockerComposeUtils.test.ts",
# "src/test/dockerfileUtils.test.ts",
# "src/test/dockerUtils.test.ts",
# "src/test/imageMetadata.test.ts",
# "src/test/variableSubstitution.test.ts",
# "src/test/container-features/registryCompatibilityOCI.test.ts",
# # Run all except the above:
# "--exclude .....",
]
runs-on: ${{ matrix.os }}
#runs-on: ${{ fromJson(needs.determine-runner.outputs.runner) }}
if: ${{github.event_name == 'push' ||
github.event.workflow_run.conclusion == 'success'}}
steps:
- name: 📂 Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: ⚙️ Setup Parser
uses: eq19/parser@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: ⚠️ Evaluate Syntax
if: runner.os == 'Ubuntu'
uses: eq19/syntax@v2
- name: 🏃♂️ Set Grammar Rules
uses: eq19/grammar@v1