Skip to content

add license header

add license header #11

Workflow file for this run

# /* Some CSS: https://github.com/MajliTech/some-css */
# /* Copyright (C) 2024 MajliTech */
# /* */
# /* This program is free software: you can redistribute it and/or modify */
# /* it under the terms of the GNU General Public License as published by */
# /* the Free Software Foundation, either version 3 of the License, or */
# /* (at your option) any later version. */
# /* This program is distributed in the hope that it will be useful, */
# /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
# /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
# /* GNU General Public License for more details. */
# /* You should have received a copy of the GNU General Public License */
# /* along with this program. If not, see <https://www.gnu.org/licenses/>.*/
name: Verify and minify (on pushes)
on:
push:
branches:
- main
pull_request:
types: [opened, edited]
workflow_dispatch:
jobs:
verify:
name: Verify CSS
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
- run: npm -g i csstree-validator
- name: Verify CSS
run: bash ./verify.sh
minify:
runs-on: ubuntu-22.04
name: Minify CSS
needs: [verify]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
- run: npm -g i minify
- name: Minify CSS
run: bash ./minify.sh
- name: Set Git User Info
run: bash -c 'git config --global user.name "some-css bot"; git config --global user.email "[email protected]"; git config --global credential.helper store'
- name: Authenticate to git
run: echo https://majlitech:${{ secrets.GITHUB_TOKEN }}@github.com > ~/.git-credentials
- name: Push to repo
run: bash -c "git add min-css; git commit -m 'Minified CSS ($(git rev-parse HEAD | head -c 7))'; git push"
# <waiting for response from w3c (https://github.com/w3c/css-validator/issues/413)>