👷 Reusable workflow

This commit is contained in:
Nikhil Badyal
2022-10-13 22:22:59 +05:30
parent 9b00ed7b13
commit 851cb9df07
4 changed files with 22 additions and 45 deletions
+3 -24
View File
@@ -22,30 +22,9 @@ concurrency:
cancel-in-progress: true
jobs:
build-apk:
name: APK Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Update Env for custom build
run: |
echo "${{ secrets.ENVS }}" >> .env
- name: Build Revanced APKs
run: |
docker-compose up
- name: Upload Build APKS
uses: actions/upload-artifact@v3
with:
name: Built-APKs
path: |
apks/*-output.apk
apks/VancedMicroG.apk"
if-no-files-found: error
uses: ./.github/workflows/build-artifact.yml
secrets:
ENVS: ${{ secrets.ENVS }}
upload-to-github:
name: GitHub Upload
@@ -1,18 +1,21 @@
name: Build Artifacts PR
name: Build Revanced APK
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
on:
workflow_call:
secrets:
ENVS:
required: false
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-apk-pr:
build-apk:
name: APK Build
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 10
steps:
- name: Check out Git repository
@@ -26,15 +29,10 @@ jobs:
run: |
docker-compose up
- name: Get Date
id: get-date
run: |
echo ::set-output name=date::$(TZ='Asia/Kolkata' date +"%Y.%m.%d-%H.%M.%S")
- name: Upload Build Artifact
- name: Upload Build APKS
uses: actions/upload-artifact@v3
with:
name: Build APKs
name: Built-APKs
path: |
apks/*-output.apk
apks/VancedMicroG.apk"
+10 -10
View File
@@ -19,16 +19,16 @@ jobs:
language: [ 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
+1 -1
View File
@@ -11,4 +11,4 @@ jobs:
linter-pr-check:
uses: ./.github/workflows/linter.yml
build-apk-pr-check:
uses: ./.github/workflows/build-apk-artifact.yml
uses: ./.github/workflows/build-artifact.yml