diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55bfbb3..2ea4446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,6 @@ name: CI # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for all branches - push: - branches: [ '**' ] pull_request: branches: [ '**' ] @@ -15,7 +13,7 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest strategy: matrix: language: [ 'python' ] @@ -35,8 +33,9 @@ jobs: - name: install-deps run: | sudo apt install desktop-file-utils gettext gir1.2-appindicator3-0.1 \ - gir1.2-gtk-3.0 libglib2.0-bin libgtk-4-bin meson python3 python3-configobj \ - python3-gi python3-setproctitle python3-tldextract redshift + gir1.2-gtk-3.0 libglib2.0-bin gtk-update-icon-cache meson python3 \ + python3-configobj python3-gi python3-setproctitle python3-tldextract \ + redshift - name: make run: ./test/test -qq diff --git a/.github/workflows/publish-deb.yml b/.github/workflows/publish-deb.yml index a6d23b4..a87f0a3 100644 --- a/.github/workflows/publish-deb.yml +++ b/.github/workflows/publish-deb.yml @@ -15,7 +15,7 @@ jobs: # This workflow contains a single job called "build-and-release" build-and-release: # The type of runner that the job will run on - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest strategy: matrix: language: [ 'python' ] @@ -29,7 +29,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout repository - uses: actions/checkout@master + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -38,8 +38,8 @@ jobs: run: | sudo apt-get update -qq sudo apt install -y build-essential debhelper devscripts dh-python \ - desktop-file-utils gettext libglib2.0-bin libgtk-4-bin meson python3 \ - pybuild-plugin-pyproject python3-sphinx python3-sphinx-argparse + desktop-file-utils gettext libglib2.0-bin gtk-update-icon-cache meson \ + python3 pybuild-plugin-pyproject python3-sphinx python3-sphinx-argparse - name: build-deb run: | diff --git a/.github/workflows/update-stable.yml b/.github/workflows/update-stable.yml index ae80bb3..cc6bca2 100644 --- a/.github/workflows/update-stable.yml +++ b/.github/workflows/update-stable.yml @@ -1,52 +1,28 @@ # Automatically fetch and merge latest tag to mamolinux/stable for new stable releases name: Update mamolinux/stable branch -# Controls when the action will run. +# Controls when the action will run. on: - schedule: - # scheduled every day at 00:00 - - cron: '0 0 */1 * *' - + # Triggers the workflow on push events but only for new tags + push: + tags: + - "*.*.*" workflow_dispatch: # on button click inputs: - branch: - description: 'Branch to merge to' + action: + description: 'Select the action to run' required: true - default: 'mamolinux/stable' # set the branch to merge to + type: choice + options: + - Update Stable Branch # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "sync-new-release" - sync-new-release: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - permissions: write-all - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@master - with: - fetch-depth: 0 - - # Set default branches when run as scheduled job - - name: Set the branches - env: - DEFAULT_UPSTREAM_BRANCH: 'master' # set the upstream branch to merge from - DEFAULT_BRANCH: 'mamolinux/stable' # set the branch to merge to - run: | - git checkout ${{ env.DEFAULT_UPSTREAM_BRANCH }} - echo "latest-tag=`git describe --abbrev=0 --tags`" >> $GITHUB_ENV - echo "branch=${{ github.event.inputs.branch || env.DEFAULT_BRANCH }}" >> $GITHUB_ENV - - - name: Set Git config - run: | - git config --local user.email "actions@github.com" - git config --local user.name "Github Actions" - - - name: Update mamolinux/stable for new release - run: | - git checkout ${{ env.branch }} - git merge --ff-only ${{ env.latest-tag }} - git push -f + # This job handles the Stable Branch Update, whether from a schedule or manual trigger + stable_update_job: + if: | + (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || + (github.event_name == 'workflow_dispatch') + uses: mamolinux/github-actions/.github/workflows/update-stable-branch.yml@main + with: + target_branch: 'mamolinux/stable'