forked from SoCuul/SCInsta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# Inspired heavily by the following amazing workflows! | ||
# https://github.com/arichornlover/uYouEnhanced/blob/main/.github/workflows/buildapp.yml | ||
# https://github.com/ISnackable/YTCubePlus/blob/main/.github/workflows/Build.yml | ||
|
||
name: Build and Package SCInsta | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
decrypted_instagram_url: | ||
description: "The direct URL to the decrypted Instagram IPA" | ||
default: "" | ||
required: true | ||
type: string | ||
bundle_id: | ||
description: "Modify the bundle ID. Not recommended" | ||
default: "com.burbn.instagram" | ||
required: true | ||
type: string | ||
app_name: | ||
description: "Modify the name of the app on the Home Screen. Not recommended" | ||
default: "Instagram" | ||
required: true | ||
type: string | ||
upload_artifact: | ||
description: "Upload Artifact" | ||
default: true | ||
required: false | ||
type: boolean | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
name: Build SCInsta | ||
runs-on: macos-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout Main | ||
uses: actions/[email protected] | ||
with: | ||
path: main | ||
submodules: recursive | ||
|
||
- name: Install Dependencies | ||
run: brew install ldid dpkg make | ||
|
||
- name: Set PATH environment variable | ||
run: echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH | ||
|
||
- name: Setup Theos | ||
uses: actions/[email protected] | ||
with: | ||
repository: theos/theos | ||
ref: master | ||
path: theos | ||
submodules: recursive | ||
|
||
- name: SDK Caching | ||
id: SDK | ||
uses: actions/[email protected] | ||
env: | ||
cache-name: iOS-14.5-SDK | ||
with: | ||
path: theos/sdks/ | ||
key: ${{ env.cache-name }} | ||
restore-keys: ${{ env.cache-name }} | ||
|
||
- name: Download iOS SDK | ||
if: steps.SDK.outputs.cache-hit != 'true' | ||
run: | | ||
git clone --quiet -n --depth=1 --filter=tree:0 https://github.com/xybp888/sdks/ | ||
cd sdks | ||
git sparse-checkout set --no-cone iPhoneOS14.5.sdk | ||
git checkout | ||
mv *.sdk $THEOS/sdks | ||
env: | ||
THEOS: ${{ github.workspace }}/theos | ||
|
||
- name: Setup Theos Jailed | ||
uses: actions/[email protected] | ||
with: | ||
repository: qnblackcat/theos-jailed | ||
ref: master | ||
path: theos-jailed | ||
submodules: recursive | ||
|
||
- name: Install Theos Jailed | ||
run: | | ||
./theos-jailed/install | ||
env: | ||
THEOS: ${{ github.workspace }}/theos | ||
|
||
- name: Clone SCInsta Repo | ||
run: | | ||
git clone --recurse-submodules https://github.com/zeuikli/SCInsta | ||
pwd | ||
mkdir -p packages | ||
- name: Prepare Instagram IPA | ||
run: | | ||
wget "$Instagram_URL" --no-verbose -O ${{ github.workspace }}/packages/com.burbn.instagram.ipa | ||
env: | ||
THEOS: ${{ github.workspace }}/theos | ||
Instagram_URL: ${{ inputs.decrypted_instagram_url }} | ||
|
||
- name: Build SCInsta tweak for sideloading (as IPA) | ||
run: | | ||
PROJECT_PATH=/Users/runner/work/SCInsta/SCInsta/SCInsta/ | ||
cd $PROJECT_PATH | ||
CMAKE_OSX_ARCHITECTURES="arm64e;arm64" | ||
ipaFile="/Users/runner/work/SCInsta/SCInsta/packages/com.burbn.instagram.ipa" | ||
echo "IPA File: $ipaFile" | ||
ls -l | ||
./build.sh | ||
env: | ||
THEOS: ${{ github.workspace }}/theos | ||
|
||
- name: Upload Artifact | ||
if: ${{ inputs.upload_artifact }} | ||
uses: actions/[email protected] | ||
with: | ||
name: SCInsta_${{ github.run_number }} | ||
path: /Users/runner/work/SCInsta/SCInsta/SCInsta/packages/SCInsta-sideloaded.ipa | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Delete old workflow runs | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
days: | ||
description: 'Days-worth of runs to keep for each workflow' | ||
required: true | ||
default: '7' | ||
minimum_runs: | ||
description: 'Minimum runs to keep for each workflow' | ||
required: true | ||
default: '5' | ||
delete_workflow_pattern: | ||
description: 'Name or filename of the workflow (if not set, all workflows are targeted)' | ||
required: false | ||
default: 'Build and Package SCInsta' | ||
delete_workflow_by_state_pattern: | ||
description: 'Filter workflows by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually' | ||
required: true | ||
default: "ALL" | ||
type: choice | ||
options: | ||
- "ALL" | ||
- active | ||
- deleted | ||
- disabled_inactivity | ||
- disabled_manually | ||
delete_run_by_conclusion_pattern: | ||
description: 'Remove runs based on conclusion: action_required, cancelled, failure, skipped, success' | ||
required: true | ||
default: "ALL" | ||
type: choice | ||
options: | ||
- "ALL" | ||
- "Unsuccessful: action_required,cancelled,failure,skipped" | ||
- action_required | ||
- cancelled | ||
- failure | ||
- skipped | ||
- success | ||
dry_run: | ||
description: 'Logs simulated changes, no deletions are performed' | ||
required: false | ||
|
||
# schedule: | ||
# - cron: '0 0 * * *' | ||
|
||
jobs: | ||
del_runs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: write | ||
contents: read | ||
steps: | ||
- name: Delete workflow runs | ||
uses: Mattraks/delete-workflow-runs@v2 | ||
with: | ||
token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
retain_days: ${{ github.event.inputs.days }} | ||
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }} | ||
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }} | ||
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }} | ||
delete_run_by_conclusion_pattern: >- | ||
${{ | ||
startsWith(github.event.inputs.delete_run_by_conclusion_pattern, 'Unsuccessful:') | ||
&& 'action_required,cancelled,failure,skipped' | ||
|| github.event.inputs.delete_run_by_conclusion_pattern | ||
}} | ||
dry_run: ${{ github.event.inputs.dry_run }} |