diff --git a/Dockerfile b/Dockerfile index ba6bbe9..533a7da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM debian COPY filters.sh /filters.sh RUN apt-get update && apt-get install -y wget RUN apt-get update && apt-get install -y python3 && apt-get install -y git python3-pip -RUN wget -O gh https://github.com/cli/cli/releases/download/v2.2.0/gh_2.2.0_linux_amd64.deb +RUN wget -O gh https://github.com/cli/cli/releases/download/v2.3.0/gh_2.3.0_linux_amd64.deb RUN dpkg -i gh # Code file to execute when the docker container starts up (`entrypoint.sh`) RUN chmod 777 /filters.sh diff --git a/action.yml b/action.yml index 83036b1..9a37ee1 100644 --- a/action.yml +++ b/action.yml @@ -1,21 +1,15 @@ -name: "Rani" -description: "filters filters" +name: "Filters-maker" +description: "GitHub Action script for building my blocklist" branding: icon: 'activity' color: 'green' inputs: - Destination_NAME: - description: "destination's name of repo" - required: true Destination_UNAME: description: "Destination GitHub Username" required: true Destination_REPO: - description: "Destination GitHub Repo Name" - required: true - Destination_FOLDER: - description: "folder of action" + description: "Destination GitHub Repository Name" required: true Destination_VERSION: description: "Version on Destination etc. Pro , ucate , Hell" @@ -32,29 +26,19 @@ inputs: REPO_BRANCH: description: "Git Branch" required: true - BRANCH_VERSION: - description: "Git Version Branch" - required: false sub_action_location: - description: "Action Location Must be in .py" - required: false - sub_action_Repo: - description: "Repo" + description: "Sub Action File extension need to be .py" required: false runs: using: "docker" image: "Dockerfile" args: - - ${{ inputs.Destination_NAME }} - ${{ inputs.Destination_UNAME }} - ${{ inputs.Destination_REPO }} - - ${{ inputs.Destination_FOLDER }} - ${{ inputs.Destination_VERSION }} - ${{ inputs.ACTION_FILE }} - ${{ inputs.GIT_NAME }} - ${{ inputs.GIT_EMAIL }} - ${{ inputs.REPO_BRANCH }} - - ${{ inputs.BRANCH_VERSION }} - ${{ inputs.sub_action_location }} - - ${{ inputs.sub_action_Repo }} diff --git a/filters.sh b/filters.sh index 2e9a74a..70b439d 100644 --- a/filters.sh +++ b/filters.sh @@ -2,8 +2,7 @@ git clone https://github.com/minoplhy/filters-maker /filters-maker git clone https://x-access-token:$API_TOKEN_GITHUB@github.com/$INPUT_DESTINATION_UNAME/$INPUT_DESTINATION_REPO.git /repros mkdir /reprwiki -mkdir /reprwiki/$INPUT_DESTINATION_FOLDER/ -mkdir /reprwiki/$INPUT_DESTINATION_FOLDER/$INPUT_DESTINATION_VERSION +mkdir /reprwiki/Private-build/ pip3 install -r /filters-maker/requirements.txt cd /reprwiki python3 /repros/$INPUT_ACTION_FILE @@ -13,7 +12,7 @@ git config --local user.name $INPUT_GIT_NAME git config --local user.email $INPUT_GIT_EMAIL git add . git commit -m "Schedule Building : $TIMEDATE" -git push -u origin $INPUT_BRANCH_VERSION +git push -u origin $INPUT_REPO_BRANCH if [ -f "/repros/$INPUT_SUB_ACTION_LOCATION" ]; then echo $API_TOKEN_GITHUB > token.txt gh auth login --with-token < token.txt