diff --git a/.github/workflows/flathub_push_main.yml b/.github/workflows/flathub_push_main.yml index 4ce834df..5ebf18ac 100644 --- a/.github/workflows/flathub_push_main.yml +++ b/.github/workflows/flathub_push_main.yml @@ -15,6 +15,10 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 1 - + - name: Pushing main to Flathub run: automation_tools/flathub_push_main.sh + env: + GIT_NAME: ${{ secrets.GITNAME }} + GIT_MAIL: ${{ secrets.GITMAIL }} + GIT_TOKEN: ${{ secrets.GITTOKEN }} diff --git a/automation_tools/flathub_push_main.sh b/automation_tools/flathub_push_main.sh index 417302c6..4a438226 100755 --- a/automation_tools/flathub_push_main.sh +++ b/automation_tools/flathub_push_main.sh @@ -70,8 +70,8 @@ cat << EOF >> flathub.json EOF if [ -n "${GITHUB_WORKFLOW}" ]; then - git config user.name "${{ secrets.GITNAME }}" - git config user.email "${{ secrets.GITMAIL }}" + git config user.name "$GIT_NAME" + git config user.email "$GIT_MAIL" elif [[ -z $(git config --get user.name) || -z $(git config --get user.email) ]]; then read -p "No git user.name set, please enter your name: " git_username git config --global user.name "$git_username" @@ -80,7 +80,7 @@ elif [[ -z $(git config --get user.name) || -z $(git config --get user.email) ]] fi if [ -n "${GITHUB_WORKFLOW}" ]; then - secret="${{ secrets.TRIGGER_BUILD_TOKEN }}@" + secret="$GIT_TOKEN@" fi git add *