diff options
| author | Menny Even Danan <menny@evendanan.net> | 2020-03-31 19:13:39 +0000 |
|---|---|---|
| committer | Menny Even Danan <menny@evendanan.net> | 2020-03-31 19:13:39 +0000 |
| commit | ad8980b8fdc8a5abc6facc005d31c32ef0fd40b6 (patch) | |
| tree | 07919558c177e95f7a38776238a7db2582009b7b | |
| parent | da7b89505de709cc79345a52ce7afb514ef320f2 (diff) | |
| download | AnySoftKeyboard-ad8980b8fdc8a5abc6facc005d31c32ef0fd40b6.tar.gz AnySoftKeyboard-ad8980b8fdc8a5abc6facc005d31c32ef0fd40b6.tar.bz2 | |
calculate SHA if specificed as HEAD
| -rwxr-xr-x | .github/actions/deploy-request/deployment_request.sh | 5 | ||||
| -rw-r--r-- | .github/workflows/deployment_promote.yml | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.github/actions/deploy-request/deployment_request.sh b/.github/actions/deploy-request/deployment_request.sh index d9696085e..f47753fc1 100755 --- a/.github/actions/deploy-request/deployment_request.sh +++ b/.github/actions/deploy-request/deployment_request.sh @@ -12,6 +12,11 @@ shift API_TOKEN="${1}" shift +if [[ "${SHA}" == "HEAD" ]]; then + echo "HEAD was specified as SHA. Taking from git:" + SHA="$(git show-ref --head --hash "${REF}" | tail -n 1)" + echo "HEAD SHA was found to be '${SHA}'." +fi echo "Request deployment flow for sha ${SHA} on branch ${REF}. New deployment: ${NEW_DEPLOY}." ./gradlew :deployment:deploymentRequestProcess -PRequest.sha="${SHA}" -PRequest.ref="${REF}" -PRequest.new_deploy="${NEW_DEPLOY}" -PRequest.apiUsername="${API_USERNAME}" -PRequest.apiUserToken="${API_TOKEN}" diff --git a/.github/workflows/deployment_promote.yml b/.github/workflows/deployment_promote.yml index cae867bdc..5a24004e7 100644 --- a/.github/workflows/deployment_promote.yml +++ b/.github/workflows/deployment_promote.yml @@ -23,7 +23,7 @@ jobs: - name: request-scheduled-promote uses: ./.github/actions/deploy-request with: - sha: ${{ github.sha }} + sha: HEAD ref: ${{ matrix.refname }} new_deploy: false api_username: ${{ secrets.BOT_MASTER_RW_GITHUB_USERNAME }} |
