This commit is contained in:
minoplhy 2022-01-15 16:05:37 +07:00
parent e4f86c7b24
commit dff9be3c3c
Signed by: minoplhy
GPG Key ID: 90667A59A9908AEC
3 changed files with 7 additions and 24 deletions

View File

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

View File

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

View File

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