Build and deploy eQuantum site #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |