Skip to content

Commit

Permalink
fix: inputs start with INPUT_ in runners
Browse files Browse the repository at this point in the history
  • Loading branch information
katorly committed Sep 27, 2024
1 parent d4c3928 commit 0523cfe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
- name: GitHub mirror Gitea
uses: katorlys/gitea-mirror-action@v1
with:
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }}
GITHUB_PAT: ${{ secrets.GH_PAT }}
GITEA_HOST: ${{ secrets.GITEA_HOST }}
GITEA_USERNAME: ${{ secrets.GITEA_USERNAME }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
Expand All @@ -70,8 +70,8 @@ jobs:
MIRROR_STARRED: false
MIRROR_COLLABORATOR: false
MIRROR_ORGANIZATION: false
RULE_MODE: 'blacklist'
RULE_REGEX: 'EpicGames/.*,NVIDIAGameWorks/.*'
MODE: 'blacklist'
REGEX: 'EpicGames/.*,NVIDIAGameWorks/.*'
```
Expand Down
42 changes: 21 additions & 21 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,52 @@ git clone https://github.com/katorlys/github-mirror-gitea.git

cd github-mirror-gitea

if [ -n "${GITHUB_USERNAME}" ]; then
export GITHUB_USERNAME=${GITHUB_USERNAME}
if [ -n "${INPUT_GITHUB_USERNAME}" ]; then
export GITHUB_USERNAME=${INPUT_GITHUB_USERNAME}
else
echo ">> Error: You have to set your GitHub username <<"
exit 1
fi

if [ -n "${GITHUB_PAT}" ]; then
export GITHUB_PAT=${GITHUB_PAT}
if [ -n "${INPUT_GITHUB_PAT}" ]; then
export GITHUB_PAT=${INPUT_GITHUB_PAT}
else
echo ">> Error: You have to set your GitHub personal access token <<"
exit 1
fi

if [ -n "${GITEA_USERNAME}" ]; then
export GITEA_USERNAME=${GITEA_USERNAME}
if [ -n "${INPUT_GITEA_USERNAME}" ]; then
export GITEA_USERNAME=${INPUT_GITEA_USERNAME}
else
echo ">> Error: You have to set your Gitea username <<"
exit 1
fi

if [ -n "${GITEA_HOST}" ]; then
export GITEA_HOST=${GITEA_HOST}
if [ -n "${INPUT_GITEA_HOST}" ]; then
export GITEA_HOST=${INPUT_GITEA_HOST}
else
echo ">> Error: You have to set your Gitea hostname <<"
exit 1
fi

if [ -n "${GITEA_PAT}" ]; then
export GITEA_PAT=${GITEA_PAT}
if [ -n "${INPUT_GITEA_PAT}" ]; then
export GITEA_PAT=${INPUT_GITEA_PAT}
else
echo ">> Error: You have to set your Gitea personal access token <<"
exit 1
fi

export CREATE_ORG=${CREATE_ORG}
export REMOVE_INEXIST_REPO=${REMOVE_INEXIST_REPO}
export REMOVE_EXISTING_REPO=${REMOVE_EXISTING_REPO}
export MIRROR_OWNED=${MIRROR_OWNED}
export MIRROR_PRIVATE=${MIRROR_PRIVATE}
export MIRROR_FORKED=${MIRROR_FORKED}
export MIRROR_STARRED=${MIRROR_STARRED}
export MIRROR_COLLABORATOR=${MIRROR_COLLABORATOR}
export MIRROR_ORGANIZATION=${MIRROR_ORGANIZATION}
export REPO_RULE=${MODE}
export REPO_NAME=${REGEX}
export CREATE_ORG=${INPUT_CREATE_ORG}
export REMOVE_INEXIST_REPO=${INPUT_REMOVE_INEXIST_REPO}
export REMOVE_EXISTING_REPO=${INPUT_REMOVE_EXISTING_REPO}
export MIRROR_OWNED=${INPUT_MIRROR_OWNED}
export MIRROR_PRIVATE=${INPUT_MIRROR_PRIVATE}
export MIRROR_FORKED=${INPUT_MIRROR_FORKED}
export MIRROR_STARRED=${INPUT_MIRROR_STARRED}
export MIRROR_COLLABORATOR=${INPUT_MIRROR_COLLABORATOR}
export MIRROR_ORGANIZATION=${INPUT_MIRROR_ORGANIZATION}
export REPO_RULE=${INPUT_MODE}
export REPO_NAME=${INPUT_REGEX}

pip3 install -r requirements.txt

Expand Down

0 comments on commit 0523cfe

Please sign in to comment.