Skip to content

Commit

Permalink
CI: Use tytan652/flatpak-github-actions image for Flatpak jobs
Browse files Browse the repository at this point in the history
The actual Fedora-based image are not compatible with the action because
Fedora provides unstable version of flatpak-builder and a breakage
happened between two unstable version

This also means that the action is not completely compatible with
flatpak-builder 1.4

To solve this issue an alternative base image was proposed, but it is
not upstreamed yet, so my fork registry is used for now

Also flatpak-builder-lint is provided in the image so the related action
is modified to work with the provided version
  • Loading branch information
tytan652 committed Feb 2, 2024
1 parent 6af9ae6 commit 4fed8aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 deletions.
21 changes: 2 additions & 19 deletions .github/actions/flatpak-builder-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,14 @@ runs:
;;
esac
- uses: actions/checkout@v4
with:
repository: flathub/flatpak-builder-lint
ref: v2.0.13
path: flatpak-builder-lint
set-safe-directory: ${{ inputs.workingDirectory }}

- name: Install Dependencies 🛍️
shell: bash
working-directory: ${{ inputs.workingDirectory }}
run: |
: Install Dependencies 🛍️
echo ::group::Install Dependencies
dnf install -y -q poetry jq
poetry -q -C flatpak-builder-lint install
echo ::endgroup::
- name: Run flatpak-builder-lint
id: result
shell: bash
working-directory: ${{ inputs.workingDirectory }}
run: |
: Run flatpak-builder-lint
exit_code=0
ret=$(poetry -C flatpak-builder-lint run flatpak-builder-lint --exceptions ${{ inputs.artifact }} ${{ inputs.path }}) || exit_code=$?
ret=$(flatpak-builder-lint --exceptions ${{ inputs.artifact }} ${{ inputs.path }}) || exit_code=$?
if [[ $exit_code != 0 && -z "$ret" ]]; then
echo "::error::Error while running flatpak-builder-lint"
exit 2
Expand All @@ -72,7 +55,7 @@ runs:
for ((i = 0 ; i < $(echo $ret | jq '.errors | length') ; i++)); do
error=$(echo $ret | jq ".errors[$i]")
if [[ "${{ inputs.validateToPublish }}" == "false" && "${error//\"}" == "appstream-screenshots-not-mirrored" ]]; then
if [[ "${{ inputs.validateToPublish }}" == "false" && "${error//\"}" == "appstream-screenshots-not-mirrored-in-ostree" ]]; then
echo "::notice::$error found and ignored in the Flatpak ${{ inputs.artifact }}"
n_errors=$(($n_errors-1))
else
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ jobs:
run:
shell: bash
container:
image: bilelmoussaoui/flatpak-github-actions:kde-6.5
image: ghcr.io/tytan652/flatpak-github-actions:kde-6.6-x86_64
options: --privileged
steps:
- uses: actions/checkout@v4
Expand All @@ -268,8 +268,7 @@ jobs:
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
echo '::group::Install GitHub CLI tool'
dnf install -y -q gh
echo '::group::Install GitHub CLI Actions Cache Extension'
gh extension install actions/gh-actions-cache
echo '::endgroup::'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
YOUTUBE_SECRET: ${{ secrets.YOUTUBE_SECRET }}
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
container:
image: bilelmoussaoui/flatpak-github-actions:kde-6.5
image: ghcr.io/tytan652/flatpak-github-actions:kde-6.6-x86_64
options: --privileged
strategy:
matrix:
Expand All @@ -81,7 +81,6 @@ jobs:
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
dnf install -y -q gh
gh extension install actions/gh-actions-cache
cache_key='flatpak-builder-${{ hashFiles('build-aux/**/*.json') }}'
Expand Down

0 comments on commit 4fed8aa

Please sign in to comment.