From f07f13b29d03930181c22b7f5a6c471a50929583 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Sun, 1 Jun 2025 15:31:30 +0500 Subject: [PATCH] ci: move push script to dev scripts Signed-off-by: Boris Yumankulov --- .gitea/workflows/generate-appid.yml | 39 +------------------ .../push-to-gitea.sh | 0 2 files changed, 1 insertion(+), 38 deletions(-) rename push-to-gitea.sh => dev-scripts/push-to-gitea.sh (100%) diff --git a/.gitea/workflows/generate-appid.yml b/.gitea/workflows/generate-appid.yml index 7007b8f..32c0f8e 100644 --- a/.gitea/workflows/generate-appid.yml +++ b/.gitea/workflows/generate-appid.yml @@ -37,41 +37,4 @@ jobs: GITEA_ACTOR: ${{ gitea.actor }} GITEA_SERVER: "git.linux-gaming.ru" GITEA_REPOSITORY: ${{ gitea.repository }} - run: | - # Create the push script - cat << 'EOF' > push-to-gitea.sh - #!/bin/sh - set -e - - timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ") - - AUTHOR_EMAIL=${INPUT_AUTHOR_EMAIL:-'gitea-actions@users.noreply.gitea.com'} - AUTHOR_NAME=${INPUT_AUTHOR_NAME:-'Gitea Actions'} - MESSAGE=${INPUT_MESSAGE:-"chore: update steam apps list ${timestamp}"} - BRANCH=main - - INPUT_DIRECTORY=${INPUT_DIRECTORY:-'.'} - - echo "Push to branch $INPUT_BRANCH" - [ -z "${GITEA_TOKEN}" ] && { - echo 'Missing input "gitea_token: ${{ secrets.GITEA_TOKEN }}".' - exit 1 - } - - cd "${INPUT_DIRECTORY}" - - remote_repo="https://${GITEA_ACTOR}:${GITEA_TOKEN}@${GITEA_SERVER}/${GITEA_REPOSITORY}.git" - - git config http.sslVerify false - git config --local user.email "${AUTHOR_EMAIL}" - git config --local user.name "${AUTHOR_NAME}" - - git add -A - git commit -m "${MESSAGE}" || exit 0 - - git push "${remote_repo}" HEAD:"${BRANCH}" - EOF - - # Make the script executable and run it - chmod +x push-to-gitea.sh - ./push-to-gitea.sh + run: bash dev-scripts/push-to-gitea.sh diff --git a/push-to-gitea.sh b/dev-scripts/push-to-gitea.sh similarity index 100% rename from push-to-gitea.sh rename to dev-scripts/push-to-gitea.sh