Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
validate-release-label:
name: Validate Release Label
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
should_build: ${{ steps.classify.outputs.should_build }}

Expand All @@ -48,6 +50,26 @@ jobs:
}

const pr = context.payload.pull_request;
const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
per_page: 100,
});

const ghPagesOnly =
files.length > 0 &&
files.every((file) =>
file.filename.startsWith("gh-pages/") &&
(!file.previous_filename || file.previous_filename.startsWith("gh-pages/"))
);

if (ghPagesOnly) {
core.info("Skipping release label validation and APK build for gh-pages-only PR.");
core.setOutput("should_build", "false");
return;
}

const appReleaseLabels = new Set([
"release:breaking",
"release:feature",
Expand Down
2 changes: 1 addition & 1 deletion gh-pages/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default function Home(): ReactNode {
<Link className="button button--primary button--lg" to={config.customFields.downloadUrl as string}>
Download APK
</Link>
<Link className="button button--secondary button--lg" to={`${repositoryUrl}/stargazers`}>
<Link className="button button--secondary button--lg" to={repositoryUrl}>
⭐️ Star us on GitHub
</Link>
</div>
Expand Down
Loading