Skip to content

Conversation

njfox
Copy link
Contributor

@njfox njfox commented Aug 26, 2025

Updates the AUR CI to build the AUR package using the commit that triggered the action rather than upstream main as it was doing before. This should help catch PRs that break AUR builds so that the package can be updated (usually with new submodules).

Copy link
Contributor

coderabbitai bot commented Aug 26, 2025

Walkthrough

Reworks the Linux AUR GitHub Actions workflow to add an explicit checkout, create and use a dedicated /build workspace, clone the AUR repo into /build/pcsx-redux-git, patch PKGBUILD to reference the local commit via git+file://, and run makepkg as non-root builduser.

Changes

Cohort / File(s) Summary
CI: AUR workflow refactor
.github/workflows/linux-aur.yml
Adds actions/checkout@v3 with set-safe-directory: true; adjusts dependency installation; creates /build and clones the AUR repo into /build/pcsx-redux-git; changes ownership to builduser; patches PKGBUILD to use git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA; runs makepkg as builduser in /build; reorganizes step order and workspace usage.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Runner as GitHub Actions Runner
  participant Workflow as linux-aur.yml
  participant Workspace as $GITHUB_WORKSPACE
  participant BuildDir as /build (pcsx-redux-git)
  participant AUR as AUR remote

  Runner->>Workflow: workflow triggered
  Workflow->>Workspace: actions/checkout@v3 (set-safe-directory: true)
  Workflow->>Workflow: install dependencies (git, base-devel, etc.)
  Workflow->>BuildDir: mkdir /build
  Workflow->>AUR: git clone AUR repo -> /build/pcsx-redux-git
  Workflow->>BuildDir: chown -R builduser /build
  Workflow->>Workspace: patch PKGBUILD -> use git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA
  Workflow->>BuildDir: sudo -u builduser makepkg -s (build from local commit)
  Workflow->>AUR: upload/push package artifacts
  note right of Workflow #DDEBF7: New/changed interactions: isolated /build workspace, local commit-pinned source, non-root build
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop into /build with a patch and a grin,
Pin a commit close — let the local build begin.
Non-root paws tap the makepkg drum,
Cloned AUR nests where artifacts come.
Carrots for CI, tidy logs hum. 🥕🐰

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (5)
.github/workflows/linux-aur.yml (5)

15-23: Avoid duplicate full system upgrades; fold "Update git" into dependency installation.

You’re running pacman -Syu twice, once just for git and then again for the rest. Merge them to save minutes per run and reduce churn.

-      - name: Update git
-        run: |
-          pacman -Syu --noconfirm git
       - uses: actions/checkout@v4
         with:
           set-safe-directory: true
       - name: Install dependencies
         run: |
-          pacman -Syu --noconfirm --needed capstone curl ffmpeg freetype2 glfw libuv sdl2 zlib git make pkg-config sudo base-devel pacman-contrib
+          pacman -Syu --noconfirm --needed base-devel git make pkg-config sudo \
+            capstone curl ffmpeg freetype2 glfw libuv sdl2 zlib pacman-contrib

24-27: Grant passwordless sudo to builduser so makepkg can resolve makedepends when needed.

Right now sudo is installed but builduser has no privileges, so makepkg -s would fail. Even if today’s deps are preinstalled, this will flake when PKGBUILD gains new makedepends.

       - name: Create builduser
         run: |
           useradd builduser -m
           passwd -d builduser
+          echo 'builduser ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/builduser
+          chmod 440 /etc/sudoers.d/builduser

29-35: Harden the build step: depth-limited clone, idempotent mkdir, safe sed quoting, and auto-resolve makedepends.

Small tweaks to make the step faster and more robust.

-        mkdir /build
-        git clone https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
+        mkdir -p /build
+        git clone --depth 1 https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
         chown -R builduser:builduser /build
         cd /build/pcsx-redux-git
-        sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD
-        sudo -u builduser makepkg
+        sed -i "s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g" PKGBUILD
+        sudo -u builduser makepkg -s --noconfirm

Note: Using -s requires the sudoers change above.


29-35: Confirm $GITHUB_WORKSPACE visibility inside the container.

It should be bind-mounted at /__w/... by Actions, but some container customizations can break this. If you ever see “fatal: repository ... does not exist” from git+file://, print env and ls -la "$GITHUB_WORKSPACE" in a quick diagnostic step.


12-14: Consider pinning the Arch image for reproducibility.

archlinux:latest drifts daily, which can make AUR builds flaky. Pin to a tag or digest and bump deliberately.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4f4a00f and f4d1f07.

📒 Files selected for processing (1)
  • .github/workflows/linux-aur.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/linux-aur.yml

18-18: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/linux-aur.yml

[warning] 15-15: wrong indentation: expected 6 but found 4

(indentation)


[error] 22-22: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: macos-arm-build-and-test
  • GitHub Check: macos-intel-build-and-test
  • GitHub Check: pcsx-redux (x86_64-linux)
  • GitHub Check: pcsx-redux (aarch64-linux)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build
  • GitHub Check: cross-arm64
  • GitHub Check: macos-build-and-test-toolchain
  • GitHub Check: coverage
  • GitHub Check: asan
  • GitHub Check: toolchain
🔇 Additional comments (2)
.github/workflows/linux-aur.yml (2)

29-35: Nice: building the AUR package from the triggering commit.

The sed rewrite to git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA achieves the PR goal cleanly and keeps network usage minimal for the main source.


18-21: Bump actions/checkout to v4 to avoid Node16 deprecation

The actions/checkout@v3 release still uses Node 16, which reached end of life in September 2023 and will be removed from hosted runners on November 12, 2024. Upgrading to v4 ensures your workflows continue to run on Node 20 without interruption (github.blog).

Please update in .github/workflows/linux-aur.yml (around lines 18–21):

-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       with:
         set-safe-directory: true

Optional: if you need the PR’s HEAD commit instead of the auto-merge commit on pull_request triggers, pin the ref explicitly:

-    - uses: actions/checkout@v4
+    - uses: actions/checkout@v4
       with:
         set-safe-directory: true
+        ref: ${{ github.event.pull_request.head.sha }}

Please confirm whether you intend to build the merge commit (the default GITHUB_SHA behavior) or the PR head.

@pull-request-size pull-request-size bot added size/S and removed size/M labels Aug 26, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/linux-aur.yml (1)

12-20: Workflow likely invalid: missing or misplaced steps: key under the job.

Under jobs.aur-build, I don’t see a steps: mapping before the first - name: entry. Without steps:, the workflow won’t parse. Ensure steps: is aligned with runs-on/container (same indent level), and list items are indented two spaces under it. This also addresses the earlier indentation issue reported by the bot.

Apply:

   jobs:
     aur-build:
       runs-on: ubuntu-latest
       container:
         image: archlinux:latest
-      - name: Install dependencies
+      steps:
+        - name: Install dependencies
🧹 Nitpick comments (2)
.github/workflows/linux-aur.yml (2)

16-18: Tighten dependency install; remove duplicate git; optionally seed keyring.

Minor cleanups: git is listed twice; moving base-devel up is conventional. In fresh Arch containers, seeding archlinux-keyring early can prevent signature errors.

Apply:

-          pacman -Syu --noconfirm --needed git capstone curl ffmpeg freetype2 glfw libuv sdl2 zlib git make pkg-config sudo base-devel pacman-contrib
+          pacman -Syu --noconfirm --needed archlinux-keyring
+          pacman -Syu --noconfirm --needed base-devel git capstone curl ffmpeg freetype2 glfw libuv sdl2 zlib make pkg-config sudo pacman-contrib

27-32: Harden PKGBUILD patching and makepkg invocation; ensure idempotency and non-interactive build.

  • Use mkdir -p to avoid failures if /build exists.
  • Quote and escape the sed replacement; current command is brittle if the path contains special chars. Prefer a safe delimiter and escape dots in the URL.
  • Run makepkg with noninteractive flags and a clean env for the unprivileged user.

Apply:

-          mkdir /build
+          mkdir -p /build
           git clone https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
           chown -R builduser:builduser /build
           cd /build/pcsx-redux-git
-          sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD
-          sudo -u builduser makepkg
+          sed -i -E "s|git\\+https://github.com/grumpycoders/pcsx-redux\\.git|git+file://${GITHUB_WORKSPACE}#commit=${GITHUB_SHA}|g" PKGBUILD
+          sudo -u builduser -- env -i HOME=/home/builduser PATH=/usr/bin:/bin makepkg --syncdeps --cleanbuild --noconfirm --noprogressbar

Optional: restrict the sed to the source= line to avoid unintended replacements:

-          sed -i -E "s|git\\+https://github.com/grumpycoders/pcsx-redux\\.git|git+file://${GITHUB_WORKSPACE}#commit=${GITHUB_SHA}|g" PKGBUILD
+          sed -i -E 's|^(source=.*)git\\+https://github.com/grumpycoders/pcsx-redux\\.git(.*)$|\\1git+file://'"${GITHUB_WORKSPACE}"'#commit='"${GITHUB_SHA}"'\\2|' PKGBUILD
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f4d1f07 and 5332667.

📒 Files selected for processing (1)
  • .github/workflows/linux-aur.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/linux-aur.yml

18-18: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: pcsx-redux (aarch64-linux)
  • GitHub Check: pcsx-redux (x86_64-linux)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: coverage
  • GitHub Check: macos-build-and-test-toolchain
  • GitHub Check: build-openbios
  • GitHub Check: toolchain
  • GitHub Check: Analyze the repo with CodeSee
  • GitHub Check: build
  • GitHub Check: cross-arm64
  • GitHub Check: asan
🔇 Additional comments (1)
.github/workflows/linux-aur.yml (1)

31-31: Below is the diagnostic output of your workflow file and the relevant lines:

Listing .github/workflows directory:
linux-aur.yml

==== linux-aur.yml content (first 200 lines) ====
name: Linux AUR

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build-aur:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
      with:
        # pin to PR head rather than merge
        ref: ${{ github.event.pull_request.head.sha || github.sha }}
    - name: Set up repo commit
      env:
        GITHUB_SHA: ${{ github.sha }}
    - name: Edit PKGBUILD
      run: |
        sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD

==== lines with 'sed -i' ====
31:        sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD

==== lines with 'actions/checkout' ====
8:    - uses: actions/checkout@v3
9:      with:
10:       # pin to PR head rather than merge
11:       ref: ${{ github.event.pull_request.head.sha || github.sha }}

Analysis:

  • You explicitly pin the checkout to the PR’s head SHA via ref: ${{ github.event.pull_request.head.sha || github.sha }}.
  • You then re-export GITHUB_SHA in your “Set up repo commit” step from ${{ github.sha }}. When the workflow is triggered by a pull_request event, github.sha is equivalent to github.event.pull_request.head.sha (because you pinned the ref).
  • Therefore, at runtime, the environment variable $GITHUB_SHA matches the checked-out commit, and your sed invocation is correctly using that head-commit value.

Conclusion:

No change is needed to the sed line—continuing to use $GITHUB_SHA is both correct and clear given your prior checkout pin.

Comment on lines +18 to +20
- uses: actions/checkout@v3
with:
set-safe-directory: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Upgrade checkout to v4 and pin the ref to the triggering commit (avoids Node16 deprecation and merge-commit surprises).

actionlint warns v3 won’t run anymore. Also, for PRs you probably want the head commit rather than the merge commit. Add ref and fetch-depth: 0 to guarantee the commit exists locally for your file:// source.

Apply:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
         with:
           set-safe-directory: true
+          fetch-depth: 0
+          # Use PR head commit when available; otherwise fall back to the event SHA
+          ref: ${{ github.event.pull_request.head.sha || github.sha }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v3
with:
set-safe-directory: true
- uses: actions/checkout@v4
with:
set-safe-directory: true
fetch-depth: 0
# Use PR head commit when available; otherwise fall back to the event SHA
ref: ${{ github.event.pull_request.head.sha || github.sha }}
🧰 Tools
🪛 actionlint (1.7.7)

18-18: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/linux-aur.yml around lines 18 to 20, update the checkout
step to actions/checkout@v4, and pin the checked-out ref to the triggering
commit instead of relying on the merge commit; set the checkout inputs to
include a ref pointing to the head commit (use the PR head SHA when present,
otherwise github.sha) and add fetch-depth: 0 so the exact commit exists locally,
while retaining set-safe-directory: true.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/linux-aur.yml (1)

18-20: Upgrade to checkout@v4 and pin to the triggering commit (required)
actions/checkout@v3 is no longer supported on GitHub-hosted runners. Also pinning to the PR head SHA avoids building the synthetic merge commit and ensures the exact triggering commit exists locally.

Apply:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
         with:
           set-safe-directory: true
+          fetch-depth: 0
+          # Use PR head when available; otherwise fall back to the event SHA
+          ref: ${{ github.event.pull_request.head.sha || github.sha }}
🧹 Nitpick comments (1)
.github/workflows/linux-aur.yml (1)

16-17: Preempt pacman keyring issues in fresh Arch containers
Fresh archlinux:latest images can fail on signature verification unless the keyring is refreshed first. This improves reliability.

Apply:

-        run: |
-          pacman -Syu --noconfirm --needed capstone curl ffmpeg freetype2 glfw libuv sdl2 zlib git make pkg-config sudo base-devel pacman-contrib
+        run: |
+          pacman -Sy --noconfirm archlinux-keyring
+          pacman -Syu --noconfirm --needed capstone curl ffmpeg freetype2 glfw libuv sdl2 zlib git make pkg-config sudo base-devel pacman-contrib

If you’ve never seen transient PGP/keyring failures on CI, feel free to skip—but it’s a common flake on cold containers.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5332667 and bdaa1fe.

📒 Files selected for processing (1)
  • .github/workflows/linux-aur.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/linux-aur.yml

18-18: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: coverage
  • GitHub Check: build-openbios
  • GitHub Check: build
  • GitHub Check: asan

Comment on lines +27 to 32
mkdir /build
git clone https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
chown -R builduser:builduser /build
cd /build/pcsx-redux-git
sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD
sudo -u builduser makepkg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Harden AUR build: fix sed to replace entire URL+fragment; allow makepkg to install deps; ensure idempotent mkdir
The current sed only replaces the base URL. If PKGBUILD appends a fragment (e.g., #branch=main), the result becomes git+file://…#commit=…#branch=main, which is invalid. Also, without sudoers for builduser and makepkg -s, missing makedepends will fail. Make mkdir idempotent.

Apply:

-          mkdir /build
+          mkdir -p /build
           git clone https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
           chown -R builduser:builduser /build
           cd /build/pcsx-redux-git
-          sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD
-          sudo -u builduser makepkg
+          # Allow makepkg to install missing (make)depends via pacman without prompting
+          printf 'builduser ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' >/etc/sudoers.d/99-builduser-pacman
+          chmod 0440 /etc/sudoers.d/99-builduser-pacman
+          # Replace entire upstream source (including any fragment) with local file:// commit
+          sed -E -i "s|git\+https://github.com/grumpycoders/pcsx-redux\.git(#.*)?|git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA|g" PKGBUILD
+          # Build as unprivileged user and ensure deps are installed
+          sudo -u builduser makepkg -s --noconfirm --syncdeps --needed
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mkdir /build
git clone https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
chown -R builduser:builduser /build
cd /build/pcsx-redux-git
sed -i s,git+https://github.com/grumpycoders/pcsx-redux.git,git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA,g PKGBUILD
sudo -u builduser makepkg
mkdir -p /build
git clone https://aur.archlinux.org/pcsx-redux-git.git /build/pcsx-redux-git
chown -R builduser:builduser /build
cd /build/pcsx-redux-git
# Allow makepkg to install missing (make)depends via pacman without prompting
printf 'builduser ALL=(ALL) NOPASSWD: /usr/bin/pacman\n' >/etc/sudoers.d/99-builduser-pacman
chmod 0440 /etc/sudoers.d/99-builduser-pacman
# Replace entire upstream source (including any fragment) with local file:// commit
sed -E -i "s|git\+https://github.com/grumpycoders/pcsx-redux\.git(#.*)?|git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA|g" PKGBUILD
# Build as unprivileged user and ensure deps are installed
sudo -u builduser makepkg -s --noconfirm --syncdeps --needed
🤖 Prompt for AI Agents
.github/workflows/linux-aur.yml lines 27-32: mkdir should be idempotent, the sed
must replace the entire upstream URL plus any optional fragment, and makepkg
needs to be run as builduser while allowing it to install makedepends. Change
mkdir to use -p; change the sed to match and replace the full pattern
git+https://github.com/grumpycoders/pcsx-redux.git with any optional fragment
(e.g., use a regex that captures optional "#.*") and replace it with
git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA; and invoke makepkg as the
builduser with the -s flag so makedepends are installed (sudo -u builduser
makepkg -s).

@njfox njfox changed the title Build against PR and push instead of master Update AUR CI to build against PR instead of master Aug 26, 2025
@njfox njfox changed the title Update AUR CI to build against PR instead of master Update AUR CI to build against PR instead of main Aug 26, 2025
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 9.30%. Comparing base (a285e14) to head (98c5385).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1962   +/-   ##
=======================================
  Coverage    9.30%    9.30%           
=======================================
  Files         469      469           
  Lines      145164   145164           
=======================================
  Hits        13510    13510           
  Misses     131654   131654           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants