👷 Chore

This commit is contained in:
Nikhil Badyal
2022-11-02 21:07:58 +05:30
parent b9cf8c7232
commit 57bd895580
+14 -15
View File
@@ -7,27 +7,27 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
GITHUB_UPLOAD: GITHUB_UPLOAD:
description: 'Upload to GitHub' description: "Upload to GitHub"
required: false required: false
type: boolean type: boolean
default: true default: true
TELEGRAM_UPLOAD: TELEGRAM_UPLOAD:
description: 'Upload to Telegram' description: "Upload to Telegram"
required: false required: false
type: boolean type: boolean
default: false default: false
VIRUSTOTAL_SCAN: VIRUSTOTAL_SCAN:
description: 'Scan apks with VirusTotal' description: "Scan apks with VirusTotal"
required: false required: false
type: boolean type: boolean
default: false default: false
CLEANUP: CLEANUP:
description: 'Clear GitHub(Useful if Telegram upload is enabled)' description: "Clear GitHub(Useful if Telegram upload is enabled)"
required: false required: false
type: boolean type: boolean
default: false default: false
COMMIT_CHANGELOG: COMMIT_CHANGELOG:
description: 'Update Changelog' description: "Update Changelog"
type: boolean type: boolean
required: false required: false
default: true default: true
@@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 5 timeout-minutes: 5
needs: build-apk needs: build-apk
if: ${{ inputs.GITHUB_UPLOAD }} if: inputs.GITHUB_UPLOAD
steps: steps:
- name: Download Already Built APKs - name: Download Already Built APKs
@@ -65,7 +65,7 @@ jobs:
uses: nikhilbadyal/ghaction-rm-releases@v0.0.1 uses: nikhilbadyal/ghaction-rm-releases@v0.0.1
with: with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_PATTERN: 'Build*' RELEASE_PATTERN: "Build*"
- name: Upload Build Artifact - name: Upload Build Artifact
uses: ncipollo/release-action@v1.11.1 uses: ncipollo/release-action@v1.11.1
@@ -81,21 +81,21 @@ jobs:
sleep 10 sleep 10
virustotal-scan: virustotal-scan:
needs: [ upload-to-github ] needs: [upload-to-github]
uses: nikhilbadyal/ghactions/.github/workflows/virustotal-scan.yml@main uses: nikhilbadyal/ghactions/.github/workflows/virustotal-scan.yml@main
with: with:
FILES: | FILES: |
.apk$ .apk$
request_rate: 4 request_rate: 4
if: ${{ inputs.VIRUSTOTAL_SCAN }} if: inputs.VIRUSTOTAL_SCAN
secrets: secrets:
VT_API_KEY: ${{ secrets.VT_API_KEY }} VT_API_KEY: ${{ secrets.VT_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload-to-telegram: upload-to-telegram:
needs: [ upload-to-github ] needs: [upload-to-github]
uses: nikhilbadyal/ghactions/.github/workflows/telegram-uploader.yml@main uses: nikhilbadyal/ghactions/.github/workflows/telegram-uploader.yml@main
if: ${{ inputs.TELEGRAM_UPLOAD }} if: inputs.TELEGRAM_UPLOAD
secrets: secrets:
TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }} TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }}
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }} TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
@@ -107,7 +107,7 @@ jobs:
MESSAGE: ${{ secrets.MESSAGE_NON_ROOT }} MESSAGE: ${{ secrets.MESSAGE_NON_ROOT }}
upload-to-telegram-root: upload-to-telegram-root:
needs: [ upload-to-telegram ] needs: [upload-to-telegram]
uses: nikhilbadyal/ghactions/.github/workflows/telegram-uploader.yml@main uses: nikhilbadyal/ghactions/.github/workflows/telegram-uploader.yml@main
if: github.repository == 'nikhilbadyal/docker-py-revanced' if: github.repository == 'nikhilbadyal/docker-py-revanced'
secrets: secrets:
@@ -122,11 +122,10 @@ jobs:
SEND_MESSAGE: ${{ secrets.SEND_MESSAGE }} SEND_MESSAGE: ${{ secrets.SEND_MESSAGE }}
MESSAGE: ${{ secrets.MESSAGE_ROOT }} MESSAGE: ${{ secrets.MESSAGE_ROOT }}
cleanup: cleanup:
name: GitHub Cleanup name: GitHub Cleanup
if: ${{ inputs.CLEANUP }} if: inputs.CLEANUP
needs: [ upload-to-telegram ] needs: [upload-to-telegram]
uses: ./.github/workflows/github-cleanup.yml uses: ./.github/workflows/github-cleanup.yml
secrets: secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}