Extract common steps to separate action

This commit is contained in:
riQQ 2022-01-12 21:36:41 +01:00
parent e562975f6b
commit f86b2903f8
3 changed files with 27 additions and 33 deletions

View file

@ -0,0 +1,23 @@
name: "Theme Validation"
description: "Validate the themes"
runs:
using: "composite"
steps:
- name: Set up Node.js
uses: actions/setup-node@v1.2.0
with:
node-version: '16'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: install deps
run: npm ci
shell: bash
- name: create generated dir
run: mkdir ./assets/generated
shell: bash
- name: Prepare deploy
run: npm run prepare-deploy
shell: bash

View file

@ -8,24 +8,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1.2.0
with:
node-version: '16'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: install deps
run: npm ci
- name: create generated dir
run: mkdir ./assets/generated
- name: create stub themes
run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json"
- name: Prepare deploy
run: npm run prepare-deploy
- name: Setup and validate themes
uses: ./.github/actions/setup-and-validate
- name: Clone deployment repo
env:

View file

@ -10,21 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1.2.0
with:
node-version: '16'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: install deps
run: npm ci
- name: create generated dir
run: mkdir ./assets/generated
- name: Prepare deploy
run: npm run prepare-deploy
- name: Setup and validate themes
uses: ./.github/actions/setup-and-validate
- name: Clone deployment repo
env: