Skip to content

Commit

Permalink
Move git credentials to workflow inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
sounddrill31 authored Dec 29, 2023
1 parent c1e7070 commit 9054dcb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ on:
options:
- ROM_MANIFEST
- LOCAL_MANIFEST
GIT_USERNAME:
description: 'GIT_USERNAME'
required: true
default: 'sounddrill31'
GIT_EMAIL:
description: 'GIT_EMAIL'
required: true
default: '[email protected]'

jobs:
build:
Expand All @@ -35,8 +43,8 @@ jobs:
mkdir workspace
cd workspace
echo "workspace-folder=$(pwd)" >> $GITHUB_OUTPUT
git config --global user.name "sounddrill31"
git config --global user.email "[email protected]"
git config --global user.name ${{ github.event.inputs.GIT_USERNAME }}
git config --global user.email ${{ github.event.inputs.GIT_EMAIL }}
repo init --depth=1 -u ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }}
timeout 1m repo sync || true
timeout-minutes: 6
Expand All @@ -46,8 +54,8 @@ jobs:
mkdir workspace
cd workspace
echo "workspace-folder=$(pwd)" >> $GITHUB_OUTPUT
git config --global user.name "sounddrill31"
git config --global user.email "[email protected]"
git config --global user.name ${{ github.event.inputs.GIT_USERNAME }}
git config --global user.email ${{ github.event.inputs.GIT_EMAIL }}
git clone ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }}
mv */*.xml manifest.xml
repo init --depth=1 -m manifest.xml
Expand Down

0 comments on commit 9054dcb

Please sign in to comment.