nextcloud-desktop/.github/workflows/linux-appimage.yml
dependabot[bot] 2dd8e72c4e chore(deps): Bump actions/checkout from 4.2.2 to 5.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 12:36:53 +02:00

77 lines
3.0 KiB
YAML

# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: GPL-2.0-or-later
name: Linux Appimage Package
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Linux Appimage Package
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-appimage-qt6:client-appimage-el8-6.8.3-1
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 1
- name: Configure, compile and package
id: build-appimage
env:
PR_ID: ${{ github.event.number }}
run: |
BUILDNR=${GITHUB_RUN_ID} VERSION_SUFFIX=${GITHUB_HEAD_REF} BUILD_UPDATER=ON DESKTOP_CLIENT_ROOT=`pwd` EXECUTABLE_NAME=nextcloud QT_BASE_DIR=/opt/qt OPENSSL_ROOT_DIR=/usr/local/lib64 /bin/bash -c "./admin/linux/build-appimage.sh"
- name: Upload AppImage artifact
id: upload-appimage
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nextcloud-appimage-pr-${{ github.event.number }}
path: ${{ steps.build-appimage.outputs.APPIMAGE_NAME }}
overwrite: true
compression-level: 0 # squashfs is already compressed
- name: Comment AppImage
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const comment_identifier_string = "<!-- automated comment for an appimage build -->";
const comment_body = `
${comment_identifier_string}
Artifact containing the AppImage: [nextcloud-appimage-pr-${{ github.event.number }}.zip](${{ steps.upload-appimage.outputs.artifact-url }})
SHA256 checksum: \`${{ steps.upload-appimage.outputs.artifact-digest }}\`
To test this change/fix you can download the above artifact file, unzip it, and run it.
Please make sure to quit your existing Nextcloud app and backup your data.
`;
console.log("fetching old comments")
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
comments
.data
.filter(comment => comment.body?.includes(comment_identifier_string))
.forEach(comment => {
console.log(`deleting previous AppImage comment with ID ${comment.id}`)
github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id,
})
});
console.log("creating new comment")
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: comment_body,
});