From 109c37ca00d8dafcc8385a9eff56f2e97192ec0d Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 21 Mar 2024 08:28:09 -0700 Subject: [PATCH 1/2] Revert "Update release workflow to properly self-reference." This reverts commit 25f5b5fb17b8d786b61ca67f3798d3f572003e8e. --- .github/workflows/build_apk.yml | 13 +++++++++---- .github/workflows/release_apk.yml | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_apk.yml b/.github/workflows/build_apk.yml index 0bc83ad0..cc5a9fab 100644 --- a/.github/workflows/build_apk.yml +++ b/.github/workflows/build_apk.yml @@ -25,6 +25,10 @@ on: tar-url: required: false type: string + ref: + description: 'A ref for this workflow to check out its own repo' + required: false + type: string signed: description: 'Should this be signed with the development key? (mutually exclusive with release)' required: false @@ -71,8 +75,6 @@ jobs: runs-on: ubuntu-latest env: SERVICE_ACCOUNT_JSON: '${{ secrets.KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON }}' - REPOSITORY: ${{ github.action_repository }} - REF: ${{ github.action_ref }} outputs: apk-file-name: ${{ steps.get-apk-filename.outputs.apk-file-name }} version-code: ${{ steps.get-version-code.outputs.version-code}} @@ -88,9 +90,12 @@ jobs: echo "Must specify only one reference for the tar file to build the APK with." exit 1 - uses: actions/checkout@v4 + if: ${{ !inputs.ref }} + - uses: actions/checkout@v4 + if: ${{ inputs.ref }} with: - repository: ${{ env.REPOSITORY }} - ref: ${{ env.REF }} + repository: learningequality/kolibri-installer-android + ref: ${{ inputs.ref }} - name: Get SHA of current commit id: get-commit # Note that we do this, so that we get the same commit regardless diff --git a/.github/workflows/release_apk.yml b/.github/workflows/release_apk.yml index 94eebb8d..a25646ab 100644 --- a/.github/workflows/release_apk.yml +++ b/.github/workflows/release_apk.yml @@ -14,6 +14,10 @@ on: description: 'The version code to promote to the open testing track' required: true type: string + ref: + description: 'A ref for this workflow to check out its own repo' + required: true + type: string secrets: KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON: required: false @@ -23,13 +27,14 @@ jobs: runs-on: ubuntu-latest env: SERVICE_ACCOUNT_JSON: '${{ secrets.KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON }}' - REPOSITORY: ${{ github.action_repository }} - REF: ${{ github.action_ref }} steps: - uses: actions/checkout@v4 + if: ${{ !inputs.ref }} + - uses: actions/checkout@v4 + if: ${{ inputs.ref }} with: - repository: ${{ env.REPOSITORY }} - ref: ${{ env.REF }} + repository: learningequality/kolibri-android-installer + ref: ${{ inputs.ref }} - name: Set up Python 3.9 uses: actions/setup-python@v5 with: From 443dc56d141f501ed7113f001d6f2c6265cd9ee8 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 21 Mar 2024 08:29:30 -0700 Subject: [PATCH 2/2] Fix repo name typo. --- .github/workflows/release_apk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_apk.yml b/.github/workflows/release_apk.yml index a25646ab..81a12072 100644 --- a/.github/workflows/release_apk.yml +++ b/.github/workflows/release_apk.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v4 if: ${{ inputs.ref }} with: - repository: learningequality/kolibri-android-installer + repository: learningequality/kolibri-installer-android ref: ${{ inputs.ref }} - name: Set up Python 3.9 uses: actions/setup-python@v5