1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-05 06:14:36 +00:00

fix(ci): private repo auth (#508)

This commit is contained in:
Hazel 2024-04-24 22:08:35 +01:00 committed by GitHub
parent e535a35fb9
commit 826199c055
3 changed files with 14 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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 <<EOF
@ -70,6 +71,8 @@ RUN <<EOF
cat <<EOC >> /etc/gitconfig
[safe]
directory = *
[credential]
helper = cache
EOC
ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> /etc/ssh/ssh_known_hosts