From d64503a6f348b60ddc619b138d955acc325198fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 19:12:14 +0000 Subject: [PATCH 1/2] ci: fix Apptainer install by dropping Launchpad PPA Agent-Logs-Url: https://github.com/sequana/ribofinder/sessions/6a6f08a0-f2a7-4844-a37b-aba586ae84c3 Co-authored-by: cokelaer <778821+cokelaer@users.noreply.github.com> --- .github/workflows/apptainer.yml | 43 +++++++++++---------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/.github/workflows/apptainer.yml b/.github/workflows/apptainer.yml index 3542cf2..3c97cd0 100644 --- a/.github/workflows/apptainer.yml +++ b/.github/workflows/apptainer.yml @@ -28,41 +28,26 @@ jobs: sudo rm -rf /usr/share/dotnet sudo rm -rf "$AGENT_TOOLSDIRECTORY" - # Cache APT .deb packages - - name: Cache APT archives - uses: actions/cache@v3 - with: - path: /var/cache/apt/archives - key: ${{ runner.os }}-apt-cache-v1 - - # Cache Apptainer installation - - name: Cache Apptainer install - id: cache-apptainer - uses: actions/cache@v3 - with: - path: | - /usr/bin/apptainer - /usr/lib/apptainer - /etc/apptainer - key: ${{ runner.os }}-apptainer-v1 - - # Install Apptainer only if not cached - - name: Install Apptainer - if: steps.cache-apptainer.outputs.cache-hit != 'true' - run: | - sudo apt-get update - sudo apt-get install -y software-properties-common graphviz - sudo add-apt-repository -y ppa:apptainer/ppa - sudo apt-get update - sudo apt-get install -y apptainer - # Cache Apptainer image cache (~/.apptainer/cache) - name: Cache Apptainer images - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.apptainer/cache key: ${{ runner.os }}-apptainer-images-v1 + # Install Apptainer from GitHub releases (avoids flaky Launchpad PPA) + - name: Install Apptainer + run: | + APPTAINER_VERSION=$(curl -s https://api.github.com/repos/apptainer/apptainer/releases/latest \ + | grep '"tag_name"' | cut -d'"' -f4 | sed 's/v//') + wget -q "https://github.com/apptainer/apptainer/releases/download/v${APPTAINER_VERSION}/apptainer_${APPTAINER_VERSION}_amd64.deb" + sudo apt-get install -y "./apptainer_${APPTAINER_VERSION}_amd64.deb" + apptainer --version + + # Install graphviz + - name: Install graphviz + run: sudo apt-get install -y graphviz + # Checkout repository - name: Checkout repo uses: actions/checkout@v4 From 1efe48e394062e772ef2e7d971953cc770cf4556 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 19:12:53 +0000 Subject: [PATCH 2/2] ci: add error handling, auth token, and cleanup to Apptainer install step Agent-Logs-Url: https://github.com/sequana/ribofinder/sessions/6a6f08a0-f2a7-4844-a37b-aba586ae84c3 Co-authored-by: cokelaer <778821+cokelaer@users.noreply.github.com> --- .github/workflows/apptainer.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/apptainer.yml b/.github/workflows/apptainer.yml index 3c97cd0..a0aa78e 100644 --- a/.github/workflows/apptainer.yml +++ b/.github/workflows/apptainer.yml @@ -37,11 +37,19 @@ jobs: # Install Apptainer from GitHub releases (avoids flaky Launchpad PPA) - name: Install Apptainer + env: + GH_TOKEN: ${{ github.token }} run: | - APPTAINER_VERSION=$(curl -s https://api.github.com/repos/apptainer/apptainer/releases/latest \ + APPTAINER_VERSION=$(curl -s -H "Authorization: Bearer ${GH_TOKEN}" \ + https://api.github.com/repos/apptainer/apptainer/releases/latest \ | grep '"tag_name"' | cut -d'"' -f4 | sed 's/v//') + if [ -z "${APPTAINER_VERSION}" ]; then + echo "ERROR: Could not determine Apptainer version" >&2 + exit 1 + fi wget -q "https://github.com/apptainer/apptainer/releases/download/v${APPTAINER_VERSION}/apptainer_${APPTAINER_VERSION}_amd64.deb" sudo apt-get install -y "./apptainer_${APPTAINER_VERSION}_amd64.deb" + rm -f "./apptainer_${APPTAINER_VERSION}_amd64.deb" apptainer --version # Install graphviz