diff options
| author | Fausto Núñez Alberro <fausto.nunez@mailbox.org> | 2021-01-16 14:13:30 +0100 | 
|---|---|---|
| committer | Fausto Núñez Alberro <fausto.nunez@mailbox.org> | 2021-01-16 14:13:30 +0100 | 
| commit | 6ad62016ed3193def4464e5949dc8afc52a6d420 (patch) | |
| tree | 96a3ea1489fe503f63a24716b88d5a99511b0e5d | |
| parent | 6191622d5806d4448fa2285047936bdcee57a098 (diff) | |
Automate weekly build process with pybase16 and GH Actions
| -rw-r--r-- | .github/workflows/update.yml | 25 | ||||
| -rw-r--r-- | .gitignore | 8 | ||||
| -rw-r--r-- | Makefile | 22 | 
3 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..aed0bdc --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,25 @@ +name: Update the repository with the latest base16 colorschemes +on: +  schedule: +    - cron: "0 0 * * 0" # https://crontab.guru/every-week +jobs: +  run: +    runs-on: ubuntu-latest +    steps: +      - name: Set up Python +        uses: actions/setup-python@v1 +        with: +          python-version: 3.8 +      - name: Upgrade pip +        run: python -m pip install --upgrade pip +      - name: Install pybase16 +        run: pip install pybase16-builder +      - name: Fetch the repository code +        uses: actions/checkout@v2 +      - name: Run make +        run: make +      - name: Commit the changes, if any +        uses: stefanzweifel/git-auto-commit-action@v4.1.1 +        with: +          commit_message: Update repository with the latest base16 colorschemes +          branch: ${{ github.head_ref }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01e3d91 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +sources +schemes +sources.yaml + +templates/* + +!/templates/config.yaml +!/templates/default.mustache diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..555bdfc --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +# Ref: https://github.com/theova/base16-qutebrowser +.PHONY: all clean update build + +BUILD=pybase16 +REPO=$(shell pwd) +TEMPLATE=$(shell basename ${REPO}) +THEME_DIR=colors +TEMPLATE_DIR=templates +OUTPUT=output + +all: update build + +update: +	$(BUILD) update + +build: +	$(BUILD) build -t ${REPO} -o ${OUTPUT} +	rm -rf ${THEME_DIR} +	mv ${OUTPUT}/${TEMPLATE}/${THEME_DIR}/ ${THEME_DIR}/ + +clean: +	rm -rf ${OUTPUT} ${TEMPLATE_DIR}/*/  | 
