From 9a36c14f53117f62b716f3b1e2ef1fe9cc2356f5 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 19:32:28 +0100 Subject: [PATCH 01/28] debug moment --- .github/actions/setup-haxe/action.yml | 1 + .github/workflows/build-game.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index 54db9bf79..dd0a3a59d 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -73,6 +73,7 @@ runs: name: Install dependencies shell: bash run: | + git config --list --show-origin --show-scope haxelib --debug --global run hmm install echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 3bfea20f2..9ac024690 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -103,6 +103,7 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | + git config --list --show-origin --show-scope haxelib --global run hmm install - if: ${{ matrix.target != 'html5' }} From c87a16a0e152cf5cff85570e7691d45fbb3795ad Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 19:40:24 +0100 Subject: [PATCH 02/28] shasjakslkas --- .github/workflows/build-game.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 9ac024690..893f63def 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -23,8 +23,9 @@ jobs: steps: - name: Make git happy - if: ${{ matrix.target == 'macos' }} run: | + git config --global --unset http\.https\:\/\/github\.com\/\.extraheader + git config --global --unset safe.directory git config --global --add safe.directory $GITHUB_WORKSPACE - name: Get checkout token From b9b5c0dd9b6cd3a9e1c2a4051965dab1cfd187bd Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 19:48:18 +0100 Subject: [PATCH 03/28] i love working with git --- .github/workflows/build-game.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 893f63def..f87a3b93c 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -24,9 +24,7 @@ jobs: steps: - name: Make git happy run: | - git config --global --unset http\.https\:\/\/github\.com\/\.extraheader - git config --global --unset safe.directory - git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global --replace-all safe.directory $GITHUB_WORKSPACE - name: Get checkout token uses: actions/create-github-app-token@v1 @@ -105,6 +103,7 @@ jobs: name: Install dependencies run: | git config --list --show-origin --show-scope + cat .git/config haxelib --global run hmm install - if: ${{ matrix.target != 'html5' }} From 53d99df3fbf25170a1f8292ece98ac4536457b06 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 19:54:12 +0100 Subject: [PATCH 04/28] fuck around & find out --- .github/workflows/build-game.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index f87a3b93c..364635d56 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -102,9 +102,9 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - git config --list --show-origin --show-scope - cat .git/config + git config --global --replace-all $(git config --get-regexp http\.https\:\/\/github\.com\/\.extraheader) haxelib --global run hmm install + git config --global --unset-all http\.https\:\/\/github\.com\/\.extraheader - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 54605ec430bfb22b3fa3688d2f03793c14ac42b5 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:02:28 +0100 Subject: [PATCH 05/28] https://open.spotify.com/track/7LVHVU3tWfcxj5aiPFEW4Q --- .github/workflows/build-game.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 364635d56..6529b5b06 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -102,9 +102,11 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - git config --global --replace-all $(git config --get-regexp http\.https\:\/\/github\.com\/\.extraheader) + conf_key="http\.https\:\/\/github\.com\/\.extraheader" + conf_val=$(git config --get-regexp $conf_key | cut -d " " -f 2-) + git config --global $conf_key "$conf_val" haxelib --global run hmm install - git config --global --unset-all http\.https\:\/\/github\.com\/\.extraheader + git config --global --unset-all $conf_key - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From a5b3d62a4a8dd45ecb3dce6282d185a45846b7e8 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:07:53 +0100 Subject: [PATCH 06/28] devops is such a fun profession, featuring 'staring at github actions broken web ui for 5 minutes' --- .github/workflows/build-game.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 6529b5b06..ec4e81c0e 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -102,11 +102,11 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - conf_key="http\.https\:\/\/github\.com\/\.extraheader" - conf_val=$(git config --get-regexp $conf_key | cut -d " " -f 2-) - git config --global $conf_key "$conf_val" + conf_key="http.https://github.com/.extraheader" + conf_val=$(git config --get "$conf_key" | cut -d " " -f 2-) + git config --global "$conf_key" "$conf_val" haxelib --global run hmm install - git config --global --unset-all $conf_key + git config --global --unset-all "$conf_key" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From c896fed6c715c7b210b85e8efbc776d57c81d9d6 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:22:16 +0100 Subject: [PATCH 07/28] no --- .github/workflows/build-game.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index ec4e81c0e..ab6dc4006 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -105,7 +105,10 @@ jobs: conf_key="http.https://github.com/.extraheader" conf_val=$(git config --get "$conf_key" | cut -d " " -f 2-) git config --global "$conf_key" "$conf_val" - haxelib --global run hmm install + echo "$conf_val" + alias git='git --verbose' + haxelib --debug --global run hmm install + unalias git git config --global --unset-all "$conf_key" - if: ${{ matrix.target != 'html5' }} From 354f4cced002cff4365425057c6d6f94b8833df6 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:26:01 +0100 Subject: [PATCH 08/28] meow --- .github/workflows/build-game.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index ab6dc4006..1a21b008e 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -104,12 +104,9 @@ jobs: run: | conf_key="http.https://github.com/.extraheader" conf_val=$(git config --get "$conf_key" | cut -d " " -f 2-) - git config --global "$conf_key" "$conf_val" - echo "$conf_val" - alias git='git --verbose' - haxelib --debug --global run hmm install - unalias git - git config --global --unset-all "$conf_key" + git config --system "$conf_key" "$conf_val" + haxelib --global run hmm install -q + git config --system --unset-all "$conf_key" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 804ae7ca6f53625938bfc2381ec4987f9a202a28 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:29:39 +0100 Subject: [PATCH 09/28] i am in spain but the s is silent --- .github/workflows/build-game.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 1a21b008e..c2444c175 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -102,11 +102,8 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - conf_key="http.https://github.com/.extraheader" - conf_val=$(git config --get "$conf_key" | cut -d " " -f 2-) - git config --system "$conf_key" "$conf_val" + haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q - git config --system --unset-all "$conf_key" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 73bc4d474078f4472b4f8f7fd3dd0424316c5de8 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:35:55 +0100 Subject: [PATCH 10/28] https://open.spotify.com/track/2zXbLJiS5099aDVyTHIDU4 --- .github/workflows/build-game.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index c2444c175..599275e84 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -102,6 +102,7 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | + git config --global url.https://${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q From 2c1109cba0fa8b978eb7ed20fdc6b963857edcd1 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:40:45 +0100 Subject: [PATCH 11/28] meow --- build/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/Dockerfile b/build/Dockerfile index 88b44f7a6..b91237185 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -70,6 +70,8 @@ RUN <> /etc/gitconfig [safe] directory = * +[credential] + helper = cache EOC ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> /etc/ssh/ssh_known_hosts From fbff2dc15659341021d1430bfb31182b5c85b800 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 20:44:24 +0100 Subject: [PATCH 12/28] git good --- build/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Dockerfile b/build/Dockerfile index b91237185..a52749e11 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -28,6 +28,7 @@ echo 'fs.inotify.max_user_instances=1280' | tee -a /etc/sysctl.conf EOF ENV DEBIAN_FRONTEND="noninteractive" +ENV GIT_TERMINAL_PROMPT="0" # Prepare APT RUN < Date: Wed, 24 Apr 2024 21:06:21 +0100 Subject: [PATCH 13/28] insane in the membrane --- .github/actions/setup-haxe/action.yml | 13 +++++++++++++ .github/workflows/build-game.yml | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index dd0a3a59d..05641764e 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -17,6 +17,8 @@ inputs: targets: description: 'Targets we plan to compile to. Installs native dependencies needed.' required: true + gh-token: + description: 'GitHub secret for private repos as dependencies' runs: using: "composite" @@ -73,8 +75,19 @@ runs: name: Install dependencies shell: bash run: | + key="credential.https://github.com" git config --list --show-origin --show-scope + if [ ! -z "${{ inputs.gh-token }}" ]; then + git config --global "credential.helper" 'cache --timeout=3600' + git config --global "$key.username" "git" + git config --global "$key.password" "${{ inputs.gh-token }}" + fi haxelib --debug --global run hmm install + if [ ! -z "${{ inputs.gh-token }}" ]; then + git config --global --unset "credential.helper" + git config --global --unset "$key.username" + git config --global --unset "$key.password" + fi echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" # by default use a shared hxcpp cache diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 599275e84..4d72dc036 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -42,6 +42,8 @@ jobs: - name: Setup build environment uses: ./.github/actions/setup-haxe + with: + gh-token: ${{ steps.app_token.outputs.token }} - name: Build game if: ${{ matrix.target == 'windows' }} @@ -102,9 +104,15 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - git config --global url.https://${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ + key="credential.https://github.com" + git config --global "credential.helper" 'cache --timeout=3600' + git config --global "$key.username" "git" + git config --global "$key.password" "${{ steps.app_token.outputs.token }}" haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q + git config --global --unset "credential.helper" + git config --global --unset "$key.username" + git config --global --unset "$key.password" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 72131af7949067cb3d704f3f58f12fb424aa11f8 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 21:10:39 +0100 Subject: [PATCH 14/28] suffering --- .github/actions/setup-haxe/action.yml | 2 +- .github/workflows/build-game.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index 05641764e..c92964392 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -78,7 +78,7 @@ runs: key="credential.https://github.com" git config --list --show-origin --show-scope if [ ! -z "${{ inputs.gh-token }}" ]; then - git config --global "credential.helper" 'cache --timeout=3600' + git config --global "credential.helper" "store --file=/tmp/git-credentials" git config --global "$key.username" "git" git config --global "$key.password" "${{ inputs.gh-token }}" fi diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 4d72dc036..cb4745d40 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -105,7 +105,7 @@ jobs: name: Install dependencies run: | key="credential.https://github.com" - git config --global "credential.helper" 'cache --timeout=3600' + git config --global "credential.helper" "store --file=/tmp/git-credentials" git config --global "$key.username" "git" git config --global "$key.password" "${{ steps.app_token.outputs.token }}" haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework From 7e624af6e63d2118ad181c4f715b74ba00decff6 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 21:18:23 +0100 Subject: [PATCH 15/28] i swear to grub --- .github/actions/setup-haxe/action.yml | 15 +-------------- .github/workflows/build-game.yml | 7 ------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index c92964392..5bed10db8 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -75,20 +75,7 @@ runs: name: Install dependencies shell: bash run: | - key="credential.https://github.com" - git config --list --show-origin --show-scope - if [ ! -z "${{ inputs.gh-token }}" ]; then - git config --global "credential.helper" "store --file=/tmp/git-credentials" - git config --global "$key.username" "git" - git config --global "$key.password" "${{ inputs.gh-token }}" - fi - haxelib --debug --global run hmm install - if [ ! -z "${{ inputs.gh-token }}" ]; then - git config --global --unset "credential.helper" - git config --global --unset "$key.username" - git config --global --unset "$key.password" - fi - echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" + haxelib --global run hmm install -q # by default use a shared hxcpp cache - if: ${{ inputs.hxcpp-cache == 'true' }} diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index cb4745d40..74fd0715d 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -104,15 +104,8 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - key="credential.https://github.com" - git config --global "credential.helper" "store --file=/tmp/git-credentials" - git config --global "$key.username" "git" - git config --global "$key.password" "${{ steps.app_token.outputs.token }}" haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q - git config --global --unset "credential.helper" - git config --global --unset "$key.username" - git config --global --unset "$key.password" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 694bd2f2dd47e2fb019361ffeb6bb35a76d54a89 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 21:23:05 +0100 Subject: [PATCH 16/28] .......................... --- .github/workflows/build-game.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 74fd0715d..89376f90d 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -104,8 +104,14 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | + git config --global "credential.helper" "store --file=/tmp/git-credentials" + git config --global "credential.https://github.com.username" "git" + git config --global "credential.https://github.com.password" "${{ steps.app_token.outputs.token }}" haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q + git config --global --unset "credential.helper" + git config --global --unset "credential.https://github.com.username" + git config --global --unset "credential.https://github.com.password" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 2d1118ab04aeb2a43f13a896c6fe3d639f0a47aa Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 21:33:02 +0100 Subject: [PATCH 17/28] le pain --- .github/workflows/build-game.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 89376f90d..5786596a3 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -88,6 +88,7 @@ jobs: with: submodules: 'recursive' token: ${{ steps.app_token.outputs.token }} + persist-credentials: false - name: Config haxelib run: | @@ -105,7 +106,7 @@ jobs: name: Install dependencies run: | git config --global "credential.helper" "store --file=/tmp/git-credentials" - git config --global "credential.https://github.com.username" "git" + git config --global "credential.https://github.com.username" "x-access-token" git config --global "credential.https://github.com.password" "${{ steps.app_token.outputs.token }}" haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q From 77bb8fb5d665cfca156e61058d240fc6d6a7bf5a Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 21:39:41 +0100 Subject: [PATCH 18/28] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA --- .github/workflows/build-game.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 5786596a3..714c1c85c 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -105,14 +105,9 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - git config --global "credential.helper" "store --file=/tmp/git-credentials" - git config --global "credential.https://github.com.username" "x-access-token" - git config --global "credential.https://github.com.password" "${{ steps.app_token.outputs.token }}" + git config --global url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q - git config --global --unset "credential.helper" - git config --global --unset "credential.https://github.com.username" - git config --global --unset "credential.https://github.com.password" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From b38d0026fd21cce3efef94d94093f31023fa86ce Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 21:58:21 +0100 Subject: [PATCH 19/28] i have no idea man --- .github/actions/setup-haxe/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index 5bed10db8..e6a309b9e 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -75,7 +75,9 @@ runs: name: Install dependencies shell: bash run: | + git config --global url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf https://github.com/ haxelib --global run hmm install -q + git config --global --unset url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf # by default use a shared hxcpp cache - if: ${{ inputs.hxcpp-cache == 'true' }} From f866b914b5e97dd8986f259b8c84ff5743be0e4d Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 22:02:54 +0100 Subject: [PATCH 20/28] i am dumb --- .github/workflows/build-game.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 714c1c85c..b262b08df 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -106,7 +106,6 @@ jobs: name: Install dependencies run: | git config --global url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ - haxelib --debug git funkVis https://github.com/FunkinCrew/funkVis backend-rework haxelib --global run hmm install -q - if: ${{ matrix.target != 'html5' }} From 7c034c3b81e4c8c761edeac0be129e2f32e1b6a5 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 22:03:56 +0100 Subject: [PATCH 21/28] oops --- .github/workflows/build-game.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index b262b08df..e13908db1 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -107,6 +107,7 @@ jobs: run: | git config --global url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ haxelib --global run hmm install -q + echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 55f5e45430975d0bdbebff2c213c540f04b2f82e Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 22:07:33 +0100 Subject: [PATCH 22/28] :pleading_face: --- .github/actions/setup-haxe/action.yml | 1 + .github/workflows/build-game.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index e6a309b9e..a27d8bc68 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -78,6 +78,7 @@ runs: git config --global url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf https://github.com/ haxelib --global run hmm install -q git config --global --unset url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf + echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" # by default use a shared hxcpp cache - if: ${{ inputs.hxcpp-cache == 'true' }} diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index e13908db1..b262b08df 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -107,7 +107,6 @@ jobs: run: | git config --global url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ haxelib --global run hmm install -q - echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache From 826199c055e2022909353e973a795f3a9b35787c Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 22:08:35 +0100 Subject: [PATCH 23/28] fix(ci): private repo auth (#508) --- .github/actions/setup-haxe/action.yml | 6 +++++- .github/workflows/build-game.yml | 9 ++++++--- build/Dockerfile | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index 54db9bf79..a27d8bc68 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -17,6 +17,8 @@ inputs: targets: description: 'Targets we plan to compile to. Installs native dependencies needed.' required: true + gh-token: + description: 'GitHub secret for private repos as dependencies' runs: using: "composite" @@ -73,7 +75,9 @@ runs: name: Install dependencies shell: bash run: | - haxelib --debug --global run hmm install + git config --global url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf https://github.com/ + haxelib --global run hmm install -q + git config --global --unset url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" # by default use a shared hxcpp cache diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 3bfea20f2..b262b08df 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -23,9 +23,8 @@ jobs: steps: - name: Make git happy - if: ${{ matrix.target == 'macos' }} run: | - git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global --replace-all safe.directory $GITHUB_WORKSPACE - name: Get checkout token uses: actions/create-github-app-token@v1 @@ -43,6 +42,8 @@ jobs: - name: Setup build environment uses: ./.github/actions/setup-haxe + with: + gh-token: ${{ steps.app_token.outputs.token }} - name: Build game if: ${{ matrix.target == 'windows' }} @@ -87,6 +88,7 @@ jobs: with: submodules: 'recursive' token: ${{ steps.app_token.outputs.token }} + persist-credentials: false - name: Config haxelib run: | @@ -103,7 +105,8 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - haxelib --global run hmm install + git config --global url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ + haxelib --global run hmm install -q - if: ${{ matrix.target != 'html5' }} name: Restore hxcpp cache diff --git a/build/Dockerfile b/build/Dockerfile index 88b44f7a6..a52749e11 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -28,6 +28,7 @@ echo 'fs.inotify.max_user_instances=1280' | tee -a /etc/sysctl.conf EOF ENV DEBIAN_FRONTEND="noninteractive" +ENV GIT_TERMINAL_PROMPT="0" # Prepare APT RUN <> /etc/gitconfig [safe] directory = * +[credential] + helper = cache EOC ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> /etc/ssh/ssh_known_hosts From c102224fc2f05160261111290ec0b17f09e2ddc3 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 22:19:57 +0100 Subject: [PATCH 24/28] this is all i can imagine --- .github/actions/setup-haxe/action.yml | 4 ++-- .github/workflows/build-game.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index a27d8bc68..d0d2178b7 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -75,9 +75,9 @@ runs: name: Install dependencies shell: bash run: | - git config --global url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf https://github.com/ + git config --global 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' https://github.com/ haxelib --global run hmm install -q - git config --global --unset url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf + git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" # by default use a shared hxcpp cache diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index b262b08df..25c7edcd5 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -105,7 +105,7 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - git config --global url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ + git config --global 'url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf' https://github.com/ haxelib --global run hmm install -q - if: ${{ matrix.target != 'html5' }} From 71ea913f0a6a702d68ddf68958be246d5e47a6d3 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 22:21:54 +0100 Subject: [PATCH 25/28] fix(ci): priv repo auth, ii. (#509) --- .github/actions/setup-haxe/action.yml | 4 ++-- .github/workflows/build-game.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index a27d8bc68..d0d2178b7 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -75,9 +75,9 @@ runs: name: Install dependencies shell: bash run: | - git config --global url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf https://github.com/ + git config --global 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' https://github.com/ haxelib --global run hmm install -q - git config --global --unset url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf + git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" # by default use a shared hxcpp cache diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index b262b08df..25c7edcd5 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -105,7 +105,7 @@ jobs: - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies run: | - git config --global url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf https://github.com/ + git config --global 'url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf' https://github.com/ haxelib --global run hmm install -q - if: ${{ matrix.target != 'html5' }} From 128958697ad7a3e887e5f4f7df898fa9df24f583 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 22:23:29 +0100 Subject: [PATCH 26/28] oh my god --- .github/actions/setup-haxe/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index d0d2178b7..fd0da3187 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -75,6 +75,7 @@ runs: name: Install dependencies shell: bash run: | + git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' || true git config --global 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' https://github.com/ haxelib --global run hmm install -q git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' From 0cb206cc524067a75eacc52006b31f4be2d4acf2 Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 23:10:17 +0100 Subject: [PATCH 27/28] fix(ci): private repo auth, for real this time (#510) --- .github/actions/setup-haxe/action.yml | 10 ++- .github/workflows/build-docker-image.yml | 70 ++++++++++---------- .github/workflows/build-game.yml | 1 + .github/workflows/cancel-merged-branches.yml | 2 +- build/Dockerfile | 2 - 5 files changed, 44 insertions(+), 41 deletions(-) diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index fd0da3187..5a9f7b293 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -71,14 +71,18 @@ runs: path: .haxelib key: haxe-hmm-${{ runner.os }}-${{ hashFiles('**/hmm.json') }} + - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} + name: Prep git for dependency install + uses: gacts/run-and-post-run@v1 + with: + run: git config --global 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' https://github.com/ + post: git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' + - if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }} name: Install dependencies shell: bash run: | - git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' || true - git config --global 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' https://github.com/ haxelib --global run hmm install -q - git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV" # by default use a shared hxcpp cache diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 15c9e5582..6fbc9677e 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -4,8 +4,8 @@ on: workflow_dispatch: push: paths: - - '**/Dockerfile' - - '.github/workflows/build-docker-image.yml' + - '**/Dockerfile' + - '.github/workflows/build-docker-image.yml' jobs: build-and-push-image: @@ -15,39 +15,39 @@ jobs: packages: write steps: - - name: Get checkout token - uses: actions/create-github-app-token@v1 - id: app_token - with: - app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.APP_PEM }} - owner: ${{ github.repository_owner }} + - name: Get checkout token + uses: actions/create-github-app-token@v1 + id: app_token + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PEM }} + owner: ${{ github.repository_owner }} - - name: Checkout repo - uses: funkincrew/ci-checkout@v6 - with: - submodules: false - token: ${{ steps.app_token.outputs.token }} + - name: Checkout repo + uses: funkincrew/ci-checkout@v6 + with: + submodules: false + token: ${{ steps.app_token.outputs.token }} - - name: Log into GitHub Container Registry - uses: docker/login-action@v3.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Log into GitHub Container Registry + uses: docker/login-action@v3.1.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@v5.3.0 - with: - context: ./build - push: true - tags: | - ghcr.io/funkincrew/build-dependencies:latest - ghcr.io/funkincrew/build-dependencies:${{ github.sha }} - labels: | - org.opencontainers.image.description=precooked haxe build-dependencies - org.opencontainers.image.revision=${{ github.sha }} - org.opencontainers.image.source=https://github.com/${{ github.repository }} - org.opencontainers.image.title=${{ github.repository_owner }}/build-dependencies - org.opencontainers.image.url=https://github.com/${{ github.repository }} - org.opencontainers.image.version=${{ github.sha }} + - name: Build and push Docker image + uses: docker/build-push-action@v5.3.0 + with: + context: ./build + push: true + tags: | + ghcr.io/funkincrew/build-dependencies:latest + ghcr.io/funkincrew/build-dependencies:${{ github.sha }} + labels: | + org.opencontainers.image.description=precooked haxe build-dependencies + org.opencontainers.image.revision=${{ github.sha }} + org.opencontainers.image.source=https://github.com/${{ github.repository }} + org.opencontainers.image.title=${{ github.repository_owner }}/build-dependencies + org.opencontainers.image.url=https://github.com/${{ github.repository }} + org.opencontainers.image.version=${{ github.sha }} diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 25c7edcd5..07802557c 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -39,6 +39,7 @@ jobs: with: submodules: 'recursive' token: ${{ steps.app_token.outputs.token }} + persist-credentials: false - name: Setup build environment uses: ./.github/actions/setup-haxe diff --git a/.github/workflows/cancel-merged-branches.yml b/.github/workflows/cancel-merged-branches.yml index f66f9647b..254b21a24 100644 --- a/.github/workflows/cancel-merged-branches.yml +++ b/.github/workflows/cancel-merged-branches.yml @@ -3,7 +3,7 @@ name: Cancel queued workflows on PR merge on: pull_request: types: - - closed + - closed jobs: diff --git a/build/Dockerfile b/build/Dockerfile index a52749e11..c545d1364 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -71,8 +71,6 @@ RUN <> /etc/gitconfig [safe] directory = * -[credential] - helper = cache EOC ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> /etc/ssh/ssh_known_hosts From bebb16875ebd1be5d3c024b3a48675bdcb08e1ca Mon Sep 17 00:00:00 2001 From: Hazel Date: Wed, 24 Apr 2024 23:31:00 +0100 Subject: [PATCH 28/28] hardcode funkvis version --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index 6ee95f984..fd6da955c 100644 --- a/hmm.json +++ b/hmm.json @@ -49,7 +49,7 @@ "name": "funkVis", "type": "git", "dir": null, - "ref": "backend-rework", + "ref": "7fc9901", "url": "https://github.com/FunkinCrew/funkVis" }, {