Update build-template.yml
This commit is contained in:
19
.github/workflows/build-template.yml
vendored
19
.github/workflows/build-template.yml
vendored
@@ -1,33 +1,42 @@
|
|||||||
name: Build + Publish templates.json file
|
name: 🏗️ Build + Publish templates.json file
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [ main ]
|
||||||
- main
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# Checkout repo
|
||||||
- name: Checkout repository 🛎️
|
- name: Checkout repository 🛎️
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Get current date-time (used for commit message)
|
||||||
|
- name: Get Date 📅
|
||||||
|
id: date
|
||||||
|
run: echo "::set-output name=date::$(date +'%d-%b-%Y')"
|
||||||
|
|
||||||
|
# Downloads + installs Python (used for running gen scripts)
|
||||||
- name: Set up Python 🐍
|
- name: Set up Python 🐍
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
|
||||||
|
# Install contents of requirements.txt
|
||||||
- name: Install dependencies 📥
|
- name: Install dependencies 📥
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
# If you have any dependencies, install them here
|
cd lib && pip install -r requirements.txt
|
||||||
|
|
||||||
|
# The make command triggers all the Python scripts, generates output
|
||||||
- name: Run make command 🔨
|
- name: Run make command 🔨
|
||||||
run: make
|
run: make
|
||||||
|
|
||||||
|
# Commit and push the outputed JSON files
|
||||||
- name: Commit and push generated files ⤴️
|
- name: Commit and push generated files ⤴️
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "Liss-Bot"
|
git config --global user.name "Liss-Bot"
|
||||||
git config --global user.email "alicia-gh-bot@mail.as93.net"
|
git config --global user.email "alicia-gh-bot@mail.as93.net"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Generates templates.json [skip ci]"
|
git commit -m "Updates templates (auto-generated, on ${{ steps.date.outputs.date }})"
|
||||||
git push
|
git push
|
||||||
|
|||||||
Reference in New Issue
Block a user