mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Update android.yml
This commit is contained in:
parent
5a12ca5500
commit
02f2dbebdb
1 changed files with 12 additions and 13 deletions
13
.github/workflows/android.yml
vendored
13
.github/workflows/android.yml
vendored
|
|
@ -113,15 +113,11 @@ jobs:
|
||||||
- name: Comment on PR with APK download links
|
- name: Comment on PR with APK download links
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
script: |
|
script: |
|
||||||
try {
|
try {
|
||||||
const octokit = github.getOctokit(process.env.GH_TOKEN);
|
const { data: { artifacts } } = await github.rest.actions.listWorkflowRunArtifacts({
|
||||||
|
|
||||||
const { data: { artifacts } } = await octokit.rest.actions.listWorkflowRunArtifacts({
|
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
run_id: context.runId
|
run_id: context.runId
|
||||||
|
|
@ -141,13 +137,16 @@ jobs:
|
||||||
const betaDownloadUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/suites/${context.runId}/artifacts/${betaArtifact.id}`;
|
const betaDownloadUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/suites/${context.runId}/artifacts/${betaArtifact.id}`;
|
||||||
const prodDownloadUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/suites/${context.runId}/artifacts/${prodArtifact.id}`;
|
const prodDownloadUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/suites/${context.runId}/artifacts/${prodArtifact.id}`;
|
||||||
|
|
||||||
await octokit.rest.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
...context.repo,
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
body: `
|
body: `
|
||||||
📱 **APK for pull request is ready to see the changes** 📱
|
📱 **APK for pull request is ready to see the changes** 📱
|
||||||
- [Download Beta APK](${betaDownloadUrl})
|
- [Download Beta APK](${betaDownloadUrl})
|
||||||
- [Download Prod APK](${prodDownloadUrl})
|
- [Download Prod APK](${prodDownloadUrl})
|
||||||
|
|
||||||
|
*Note: You need to be logged in to GitHub to download the APKs.*
|
||||||
`
|
`
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue