From e7d687fe8e7131646313e6c7371e776b644f7279 Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Mon, 27 Jan 2025 18:32:45 -0500 Subject: [PATCH 1/7] chore: remove obsolete package broadcast action --- .github/workflows/pkg-change-broadcast.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/workflows/pkg-change-broadcast.yml diff --git a/.github/workflows/pkg-change-broadcast.yml b/.github/workflows/pkg-change-broadcast.yml deleted file mode 100644 index ddf9d4b..0000000 --- a/.github/workflows/pkg-change-broadcast.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: pkg-change-broadcast - -on: - push: - branches: master - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Broadcast Event - run: | - TARGET_REPO_NAME=voulage - curl -XPOST -u "${{ secrets.ORG_BROADCAST_USER}}:${{secrets.ORG_BROADCAST_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/regolith-linux/$TARGET_REPO_NAME/dispatches --data '{ "event_type": "package_update"}' From bb91b7f562a95fe51eaca59521be5d729c18828a Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Mon, 27 Jan 2025 18:35:44 -0500 Subject: [PATCH 2/7] chore: remove obsolete release action --- .github/workflows/release.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index e26dbe3..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: test -on: - push: - tags: - - "*" - -jobs: - build_packages: - runs-on: ubuntu-latest - container: - image: docker.pkg.github.com/regolith-linux/regolith-deb-builder/regolith-deb-builder:${{ matrix. release }} - credentials: - username: ${{ github.actor }} - password: ${{secrets.GITHUB_TOKEN}} - strategy: - matrix: - release: [bionic, focal, groovy] - name: Build packages on ${{ matrix.release }} - needs: [test] - steps: - - uses: actions/checkout@v2 - - name: Build package - shell: bash - run: | - gbp buildpackage --no-sign - [ $(ls ../*.deb | wc -l) == "21" ] From 31406ff83c7e45f5ece60abc856b96cddaf64767 Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Mon, 27 Jan 2025 18:38:35 -0500 Subject: [PATCH 3/7] chore: remove obsolete test action --- .github/workflows/test.yml | 47 -------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 8f4fa79..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: test -on: - push: - branches: - - master - tags-ignore: - - "*" - pull_request: - branches: - - "master" - -jobs: - test: - container: ubuntu:focal - runs-on: ubuntu-latest - # We are running these tests for both awk variants - # See https://github.com/regolith-linux/regolith-i3xrocks-config/issues/107 - strategy: - matrix: - awk: ["gawk", "mawk"] - steps: - - uses: actions/checkout@v2 - - name: Prepare test environment - shell: bash - env: - DEBIAN_FRONTEND: noninteractive - run: | - apt update -qq - apt install --no-install-recommends -y curl ca-certificates iproute2 bc silversearcher-ag umockdev ${{ matrix.awk }} - cp tests/xrescat_mock /usr/bin/xrescat - cp tests/i3-msg_mock /usr/bin/i3-msg - - name: Run net-traffic test - shell: bash - run: | - umockdev-run -- tests/net-traffic_test.sh - - name: Run temp test - shell: bash - run: | - tests/temp_test.sh - - name: Run weather test - shell: bash - run: | - tests/weather_test.sh - - name: Run disk-capacity test - shell: bash - run: | - tests/disk-capacity_test.sh From cd3460a1997cf9a2b549e96ad58e69253eb1f402 Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Mon, 27 Jan 2025 18:39:20 -0500 Subject: [PATCH 4/7] feat: enable github action to test pull requests --- .github/workflows/test-pr.yml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/test-pr.yml diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 0000000..635bae3 --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -0,0 +1,52 @@ +name: Test Pull Request + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + matrix-builder: + runs-on: ubuntu-24.04 + outputs: + includes: ${{ steps.builder.outputs.includes }} + runners: ${{ steps.builder.outputs.runners }} + steps: + - name: Build Matrix + id: builder + uses: regolith-linux/actions/build-matrix@main + with: + name: "${{ github.event.repository.name }}" + ref: "${{ github.base_ref }}" # build for target branch of the pull request + arch: "amd64" # only test on amd64 on pull requests + stage: "unstable" + + build: + runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }} + needs: matrix-builder + container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}" + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Import GPG Key + uses: regolith-linux/actions/import-gpg@main + with: + gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" + + - name: Build Package + uses: regolith-linux/actions/build-package@main + with: + name: "${{ github.event.repository.name }}" + distro: "${{ matrix.distro }}" + codename: "${{ matrix.codename }}" + stage: "unstable" + suite: "unstable" + component: "main" + arch: "${{ matrix.arch }}" From f9f8703db587ffecbc938bf8ae9dc03d8f1435f1 Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Mon, 27 Jan 2025 18:40:16 -0500 Subject: [PATCH 5/7] feat: enable github action to publish to unstable --- .github/workflows/publish-unstable.yml | 145 +++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 .github/workflows/publish-unstable.yml diff --git a/.github/workflows/publish-unstable.yml b/.github/workflows/publish-unstable.yml new file mode 100644 index 0000000..b3523f0 --- /dev/null +++ b/.github/workflows/publish-unstable.yml @@ -0,0 +1,145 @@ +name: Publish to Unstable + +on: + workflow_dispatch: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + matrix-builder: + runs-on: ubuntu-24.04 + outputs: + includes: ${{ steps.builder.outputs.includes }} + runners: ${{ steps.builder.outputs.runners }} + steps: + - name: Build Matrix + id: builder + uses: regolith-linux/actions/build-matrix@main + with: + name: "${{ github.event.repository.name }}" + ref: "${{ github.ref_name }}" + arch: "amd64 arm64" + stage: "unstable" + + build: + runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }} + needs: matrix-builder + container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}" + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }} + env: + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" + server-username: "${{ secrets.KAMATERA_USERNAME }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Import GPG Key + uses: regolith-linux/actions/import-gpg@main + with: + gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" + + - name: Build Package + id: build + uses: regolith-linux/actions/build-package@main + with: + name: "${{ github.event.repository.name }}" + distro: "${{ matrix.distro }}" + codename: "${{ matrix.codename }}" + stage: "unstable" + suite: "unstable" + component: "main" + arch: "${{ matrix.arch }}" + + - name: Setup SSH + uses: regolith-linux/actions/setup-ssh@main + with: + ssh-host: "${{ env.server-address }}" + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" + + - name: Upload Package + uses: regolith-linux/actions/upload-files@main + with: + upload-to-folder: "${{ github.event.repository.name }}" + + - name: Upload SourceLog + uses: regolith-linux/actions/upload-files@main + with: + upload-from: "${{ steps.build.outputs.buildlog-path }}" + upload-pattern: "SOURCELOG_*.txt" + upload-to-base: "/opt/archives/workspace/" + upload-to-folder: "${{ github.event.repository.name }}" + + sources: + runs-on: ubuntu-24.04 + needs: build + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" + if: ${{ !failure() && !cancelled() }} + env: + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" + server-username: "${{ secrets.KAMATERA_USERNAME }}" + steps: + - name: Import GPG Key + uses: regolith-linux/actions/import-gpg@main + with: + gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" + + - name: Setup SSH + uses: regolith-linux/actions/setup-ssh@main + with: + ssh-host: "${{ env.server-address }}" + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" + + - name: Rebuild Sources + uses: regolith-linux/actions/rebuild-sources@main + with: + workspace-subfolder: "${{ github.event.repository.name }}" + only-component: "unstable" + only-package: "${{ github.event.repository.name }}" + + publish: + runs-on: ubuntu-24.04 + needs: sources + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" + if: ${{ !failure() && !cancelled() }} + env: + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" + server-username: "${{ secrets.KAMATERA_USERNAME }}" + steps: + - name: Setup SSH + uses: regolith-linux/actions/setup-ssh@main + with: + ssh-host: "${{ env.server-address }}" + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" + + - name: Publish Repo + uses: regolith-linux/actions/publish-repo@main + with: + packages-path-subfolder: "${{ github.event.repository.name }}" + only-component: "unstable" + + manifests: + runs-on: ubuntu-24.04 + needs: [matrix-builder, publish] + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" + if: ${{ !failure() && !cancelled() }} + steps: + - name: Update Manifests + uses: regolith-linux/actions/update-manifest@main + env: + GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }} + with: + name: "${{ github.event.repository.name }}" + repo: "${{ github.server_url }}/${{ github.repository }}.git" + ref: "${{ github.ref_name }}" + sha: "${{ github.sha }}" + matrix: "${{ needs.matrix-builder.outputs.includes }}" + suite: "unstable" + component: "main" From 879cca92be72d4e6b6cc9f4c686ed6c5bd133c98 Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Mon, 27 Jan 2025 18:40:26 -0500 Subject: [PATCH 6/7] feat: enable github action to publish to testing --- .github/workflows/publish-testing.yml | 144 ++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 .github/workflows/publish-testing.yml diff --git a/.github/workflows/publish-testing.yml b/.github/workflows/publish-testing.yml new file mode 100644 index 0000000..b85e0f1 --- /dev/null +++ b/.github/workflows/publish-testing.yml @@ -0,0 +1,144 @@ +name: Publish to Testing + +on: + push: + tags: + - 'v*' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + matrix-builder: + runs-on: ubuntu-24.04 + outputs: + includes: ${{ steps.builder.outputs.includes }} + runners: ${{ steps.builder.outputs.runners }} + steps: + - name: Build Matrix + id: builder + uses: regolith-linux/actions/build-matrix@main + with: + name: "${{ github.event.repository.name }}" + ref: "${{ github.ref_name }}" + arch: "amd64 arm64" + stage: "testing" + + build: + runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }} + needs: matrix-builder + container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}" + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }} + env: + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" + server-username: "${{ secrets.KAMATERA_USERNAME }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Import GPG Key + uses: regolith-linux/actions/import-gpg@main + with: + gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" + + - name: Build Package + id: build + uses: regolith-linux/actions/build-package@main + with: + name: "${{ github.event.repository.name }}" + distro: "${{ matrix.distro }}" + codename: "${{ matrix.codename }}" + stage: "testing" + suite: "testing" + component: "main" + arch: "${{ matrix.arch }}" + + - name: Setup SSH + uses: regolith-linux/actions/setup-ssh@main + with: + ssh-host: "${{ env.server-address }}" + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" + + - name: Upload Package + uses: regolith-linux/actions/upload-files@main + with: + upload-to-folder: "${{ github.event.repository.name }}" + + - name: Upload SourceLog + uses: regolith-linux/actions/upload-files@main + with: + upload-from: "${{ steps.build.outputs.buildlog-path }}" + upload-pattern: "SOURCELOG_*.txt" + upload-to-base: "/opt/archives/workspace/" + upload-to-folder: "${{ github.event.repository.name }}" + + sources: + runs-on: ubuntu-24.04 + needs: build + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" + if: ${{ !failure() && !cancelled() }} + env: + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" + server-username: "${{ secrets.KAMATERA_USERNAME }}" + steps: + - name: Import GPG Key + uses: regolith-linux/actions/import-gpg@main + with: + gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" + + - name: Setup SSH + uses: regolith-linux/actions/setup-ssh@main + with: + ssh-host: "${{ env.server-address }}" + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" + + - name: Rebuild Sources + uses: regolith-linux/actions/rebuild-sources@main + with: + workspace-subfolder: "${{ github.event.repository.name }}" + only-component: "testing" + only-package: "${{ github.event.repository.name }}" + + publish: + runs-on: ubuntu-24.04 + needs: sources + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" + if: ${{ !failure() && !cancelled() }} + env: + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" + server-username: "${{ secrets.KAMATERA_USERNAME }}" + steps: + - name: Setup SSH + uses: regolith-linux/actions/setup-ssh@main + with: + ssh-host: "${{ env.server-address }}" + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" + + - name: Publish Repo + uses: regolith-linux/actions/publish-repo@main + with: + packages-path-subfolder: "${{ github.event.repository.name }}" + only-component: "testing" + + manifests: + runs-on: ubuntu-24.04 + needs: [matrix-builder, publish] + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" + if: ${{ !failure() && !cancelled() }} + steps: + - name: Update Manifests + uses: regolith-linux/actions/update-manifest@main + env: + GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }} + with: + name: "${{ github.event.repository.name }}" + repo: "${{ github.server_url }}/${{ github.repository }}.git" + ref: "${{ github.ref_name }}" + sha: "${{ github.sha }}" + matrix: "${{ needs.matrix-builder.outputs.includes }}" + suite: "testing" + component: "main" From 51dc0721ae83f38c77f11ad000d3838f5f110b88 Mon Sep 17 00:00:00 2001 From: Khosrow Moossavi Date: Mon, 27 Jan 2025 18:41:17 -0500 Subject: [PATCH 7/7] feat: enable github action to prepare release --- .github/workflows/prepare-release.yml | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/prepare-release.yml diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 0000000..af83666 --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -0,0 +1,54 @@ +name: Prepare a Release + +on: + workflow_dispatch: + push: + branches: + - master + paths: + - debian/changelog + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + release: + runs-on: ubuntu-24.04 + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Prepare Release + id: prepare + uses: regolith-linux/actions/prepare-release@main + env: + GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }} + with: + name: "${{ github.event.repository.name }}" + repo: "${{ github.server_url }}/${{ github.repository }}.git" + ref: "${{ github.ref_name }}" + + - name: Push Changes to Voulage + uses: stefanzweifel/git-auto-commit-action@v5 + if: ${{ steps.prepare.outputs.release-exists == 'false' }} + env: + GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }} + with: + repository: "${{ steps.prepare.outputs.voulage-path }}" + branch: "main" + file_pattern: "stage/testing/**" + commit_message: "chore: bump ${{ github.event.repository.name }} testing to ${{ steps.prepare.outputs.release-version }}" + commit_user_name: regolith-ci-bot + commit_user_email: bot@regolith-desktop.com + commit_author: "regolith-ci-bot " + + - name: Release Package + uses: softprops/action-gh-release@v2 + if: ${{ steps.prepare.outputs.release-exists == 'false' }} + with: + name: ${{ steps.prepare.outputs.release-version }} + tag_name: ${{ steps.prepare.outputs.release-version }} + token: ${{ secrets.ORG_BROADCAST_TOKEN2 }} + generate_release_notes: true