diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd18fabe..526fdf67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,12 +19,12 @@ name: Build on: push: - branches: [main] + branches: [ "main" ] pull_request: jobs: flatpak: - name: "Flatpak" + name: Flatpak runs-on: ubuntu-latest container: image: bilelmoussaoui/flatpak-github-actions:gnome-nightly @@ -35,20 +35,23 @@ jobs: # Don't fail the whole workflow if one architecture fails fail-fast: false steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install deps - run: | - dnf -y install docker - - name: Set up QEMU - id: qemu - uses: docker/setup-qemu-action@v2.1.0 - with: - platforms: arm64 - - uses: flatpak/flatpak-github-actions/flatpak-builder@v5 - with: - repository-name: gnome-nightly - bundle: gradience-devel.flatpak - manifest-path: build-aux/flatpak/com.github.GradienceTeam.Gradience.Devel.json - cache-key: flatpak-builder-${{ github.sha }} - arch: ${{ matrix.arch }} + - name: Checkout + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + dnf -y install docker + + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v2.1.0 + with: + platforms: arm64 + + - uses: flatpak/flatpak-github-actions/flatpak-builder@v5 + with: + repository-name: gnome-nightly + bundle: gradience-devel.flatpak + manifest-path: build-aux/flatpak/com.github.GradienceTeam.Gradience.Devel.json + cache-key: flatpak-builder-${{ github.sha }} + arch: ${{ matrix.arch }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index b97e45b4..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,87 +0,0 @@ -# Change the look of Adwaita, with ease -# Copyright (C) 2022 Gradience Team -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "main" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "main" ] - schedule: - - cron: '21 6 * * 5' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index b0dedc42..d25f5738 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -4,8 +4,15 @@ # # Source repository: https://github.com/actions/dependency-review-action # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement -name: 'Dependency Review' -on: [pull_request] + + +name: Dependency Review + +on: + pull_request: + schedule: + - cron: '0 0,12 * * *' + workflow_dispatch: permissions: contents: read @@ -14,7 +21,8 @@ jobs: dependency-review: runs-on: ubuntu-latest steps: - - name: 'Checkout Repository' + - name: Checkout repository uses: actions/checkout@v3 - - name: 'Dependency Review' + + - name: Dependency Review uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 2283f487..0006ef1d 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . + name: Greetings on: [pull_request_target, issues] @@ -21,6 +22,7 @@ on: [pull_request_target, issues] jobs: greeting: runs-on: ubuntu-latest + permissions: issues: write pull-requests: write @@ -28,5 +30,5 @@ jobs: - uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/4njFDtfGEZ" - pr-message: "Welcome on Gradience. 🥳 We really appreciate your pull request. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/4njFDtfGEZ." + issue-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the Matrix room: https://matrix.to/#/#Gradience-space:envs.net or the Discord server: https://discord.com/invite/4njFDtfGEZ" + pr-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your pull request as soon as possible. You can also join the Matrix room: https://matrix.to/#/#Gradience-space:envs.net or the Discord server: https://discord.com/invite/4njFDtfGEZ." diff --git a/.github/workflows/pypi-dependencies.yml b/.github/workflows/pypi-dependencies.yml new file mode 100644 index 00000000..a16df487 --- /dev/null +++ b/.github/workflows/pypi-dependencies.yml @@ -0,0 +1,53 @@ +# Change the look of Adwaita, with ease +# Copyright (C) 2022 Gradience Team +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +name: Generate PyPI Dependencies + +on: + push: + branches: [ "main" ] + paths: requirements.txt + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Run a multi-line script + run: | + curl -O https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator + chmod +x flatpak-pip-generator + python -m pip install requirements-parser + ./flatpak-pip-generator --requirements-file=requirements.txt --output pypi-dependencies + mv pypi-dependencies.json build-aux/flatpak/pypi-dependencies.json + + - name: Create pull request + uses: peter-evans/create-pull-request@v4 + with: + author: "AdwCustomizer " + title: "meta: update PyPI dependencies for Flatpak" + body: "This automated PR contains an auto-generated `pypi-dependencies.json` file used in Flatpak manifests." + labels: flatpak, ci/automated-pr + commit-message: "meta: update Flatpak PyPI dependencies" + committer: "AdwCustomizer " + branch: update-pypi-deps diff --git a/.github/workflows/pypi_deps.yml b/.github/workflows/pypi_deps.yml deleted file mode 100644 index 7a0c82f5..00000000 --- a/.github/workflows/pypi_deps.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Generate PYPI Dependencies - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "main" branch - push: - branches: [ "main" ] - paths: requirements.txt - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# 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 "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # 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@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - curl -O https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator - chmod +x flatpak-pip-generator - python -m pip install requirements-parser - ./flatpak-pip-generator --requirements-file=requirements.txt --output pypi-dependencies - mv pypi-dependencies.json build-aux/flatpak/pypi-dependencies.json - - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 - with: - commit-message: "ci: update Flatpak pypi dependencies" - title: Update `pypi-dependencies.json` - body: This is an auto-generated PR with the generation of `pypi-dependencies.json`. - labels: flatpak, automated pr - committer: "AdwCustomizer " - author: "AdwCustomizer " - branch: pypi-deps diff --git a/.github/workflows/pysa.yml b/.github/workflows/pysa.yml index d9da3d58..a2856b09 100644 --- a/.github/workflows/pysa.yml +++ b/.github/workflows/pysa.yml @@ -12,6 +12,7 @@ # # See https://pyre-check.org/docs/pysa-basics/ + name: Pysa on: diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 00000000..daa81e1b --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,36 @@ +# Change the look of Adwaita, with ease +# Copyright (C) 2022 Gradience Team +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +name: Typos + +on: + pull_request: + schedule: + - cron: '0 0,12 * * *' + workflow_dispatch: + +jobs: + typos: + name: Typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Check for typos + uses: crate-ci/typos@master + with: + config: typos.toml diff --git a/typos.toml b/typos.toml new file mode 100644 index 00000000..f7c6891c --- /dev/null +++ b/typos.toml @@ -0,0 +1,7 @@ +[type.po] +extend-glob = ["*.po"] +check-file = false + +[type.svg] +extend-glob = ["*.svg"] +check-file = false