Added delete workflows action in repo

This commit is contained in:
Akash Yadav
2022-04-23 11:40:25 +05:30
parent 417eb6eb29
commit c183e8f14c
2 changed files with 27 additions and 13 deletions
+24
View File
@@ -0,0 +1,24 @@
name: Delete old workflow runs
on:
workflow_dispatch:
inputs:
days:
description: 'Number of days.'
required: true
default: 30
minimum_runs:
description: 'The minimum runs to keep for each workflow.'
required: true
default: 6
jobs:
del_runs:
runs-on: ubuntu-latest
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 }}
+3 -13
View File
@@ -27,7 +27,7 @@ jobs:
- name: Build debug apk
uses: eskatos/gradle-command-action@v1
with:
arguments: :app:clean :app:build test
arguments: :app:clean :app:build
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
@@ -40,22 +40,12 @@ jobs:
dependencies-cache-enabled: true
configuration-cache-enabled: true
- name: Get branch name and short commit hash
id: vars
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Rename APK
run: mv app/build/outputs/apk/debug/app-debug.apk ./AndroidIDE-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }}.apk
- name: Upload APK
uses: actions/upload-artifact@v2
if: ${{ !github.head_ref }}
with:
name: AndroidIDE-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }}.apk
path: ./AndroidIDE-${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }}.apk
name: apk-debug
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload translation report
uses: actions/upload-artifact@v2