Skip to content

Update main.yml

Update main.yml #41

Workflow file for this run

name: CI for LEDSuite
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Get Dependencies and Build
runs-on: ubuntu-24.04
steps:
# Checkout the repository
- name: Checkout Code
uses: actions/checkout@v4
# Install libadwaita dependencies
- name: Install Dependencies
run: |
sudo add-apt-repository 'deb https://ftp.uni-stuttgart.de/ubuntu/ oracular main'
sudo apt-get update
sudo apt-get install -y \
libadwaita-1-dev=1.6.0-1ubuntu2 \
gettext \
desktop-file-utils
# Set up JDK
- name: Set up JDK 23
uses: actions/setup-java@v3
with:
java-version: '23'
distribution: 'temurin'
- uses: actions/setup-python@v1
# Meson Install
- name: Meson Install
uses: BSFishy/[email protected]
with:
action: install
setup-options: --prefix /tmp/install
directory: build
meson-version: 1.6.0
ninja-version: 1.11.1.2
# Generate flatpak-sources.json
- name: Generate flatpak-sources.json
run: |
./gradlew flatpakGradleGenerator
# Compare flatpak-sources.json with the one in the main branch
- name: Compare flatpak-sources.json
id: compare
run: |
git fetch origin main
if ! diff -u <(jq . flatpak-sources.json) <(git show origin/main:flatpak-sources.json) >/dev/null; then
git config --global user.email "[email protected]"
git config --global user.name "ToxicStoxm"
# Create a new branch for the PR
git checkout -b update-flatpak-sources
# Commit the changes
git add flatpak-sources.json
git commit -m "Update flatpak-sources.json"
# Push the changes
git push --set-upstream origin update-flatpak-sources
gh pr create -B main -H update-flatpak-sources --title 'Merge update-flatpak-sources into main' --body 'Created by Github action'
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create a Pull Request if files are different
- name: Create Pull Request if Needed
if: env.FILES_DIFFERS == 'true'
run: |