CI: Added ui-assets workflow.

This commit is contained in:
Luis-Hebendanz
2023-09-19 16:21:53 +02:00
parent ad2218cca9
commit 08f8815806
4 changed files with 37 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ on:
branches: main
jobs:
test:
if: ${{ github.actor != 'clan-bot' }}
runs-on: nix
steps:
- uses: actions/checkout@v3

View File

@@ -5,6 +5,7 @@ on:
branches: main
jobs:
test:
if: ${{ github.actor != 'clan-bot' }}
runs-on: nix
steps:
- uses: actions/checkout@v3

View File

@@ -1,10 +1,11 @@
name: assets
# on:
# push:
# branches:
# - main
name: assets1
on:
push:
branches:
- main
jobs:
test:
if: ${{ github.actor != 'clan-bot' }}
runs-on: nix
steps:
- name: Checkout code
@@ -29,9 +30,33 @@ jobs:
# git push if we have a diff
if [[ -n $(git diff) ]]; then
DEPS=$(nix shell --inputs-from '.#' "nixpkgs#coreutils-full" -c bash -c "echo \$PATH")
export PATH=$PATH:$DEPS
# Setup git config
git config --global user.email "clan-bot@clan.lol"
git config --global user.name "clan-bot"
################################################
# #
# WARNING: SECRETS ARE BEING PROCESSED HERE. #
# !DO NOT LOG THIS! #
# #
################################################
set +x
AUTH_TOKEN=$(echo -n "x-access-token:$GITEA_TOKEN" | base64)
git config http."$GITHUB_SERVER_URL/".extraheader "AUTHORIZATION: basic $AUTH_TOKEN"
set -x
################################################
# #
# END OF SECRETS AREA #
# #
################################################
# Commit and push
git commit -am "update ui-assets.nix"
echo "Current branch: $GITHUB_REF_NAME"
git push origin HEAD:$GITHUB_REF_NAME
fi
@@ -40,4 +65,4 @@ jobs:
fi
env:
MODIFIED_FILES: ${{ steps.changed-files.outputs.modified_files }}
GITEA_TOKEN: ${{ secrets.TEA_TOKEN_QUBASA }}
GITEA_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}