Skip to content

Commit b251393

Browse files
committedMar 17, 2025·
feat: github action initial commit
1 parent b57b588 commit b251393

File tree

4 files changed

+393
-0
lines changed

4 files changed

+393
-0
lines changed
 

‎.github/workflows/prepare-release.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Prepare a Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- debian/changelog
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-24.04
18+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Prepare Release
24+
id: prepare
25+
uses: regolith-linux/actions/prepare-release@main
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
28+
with:
29+
name: "${{ github.event.repository.name }}"
30+
repo: "${{ github.server_url }}/${{ github.repository }}.git"
31+
ref: "${{ github.ref_name }}"
32+
33+
- name: Push Changes to Voulage
34+
uses: stefanzweifel/git-auto-commit-action@v5
35+
if: ${{ steps.prepare.outputs.release-exists == 'false' }}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
38+
with:
39+
repository: "${{ steps.prepare.outputs.voulage-path }}"
40+
branch: "main"
41+
file_pattern: "stage/testing/**"
42+
commit_message: "chore: bump ${{ github.event.repository.name }} testing to ${{ steps.prepare.outputs.release-version }}"
43+
commit_user_name: regolith-ci-bot
44+
commit_user_email: bot@regolith-desktop.com
45+
commit_author: "regolith-ci-bot <bot@regolith-desktop.com>"
46+
47+
- name: Release Package
48+
uses: softprops/action-gh-release@v2
49+
if: ${{ steps.prepare.outputs.release-exists == 'false' }}
50+
with:
51+
name: ${{ steps.prepare.outputs.release-version }}
52+
tag_name: ${{ steps.prepare.outputs.release-version }}
53+
token: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
54+
target_commitish: "${{ github.sha }}"
55+
generate_release_notes: true

‎.github/workflows/publish-testing.yml

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: Publish to Testing
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
matrix-builder:
14+
runs-on: ubuntu-24.04
15+
outputs:
16+
includes: ${{ steps.builder.outputs.includes }}
17+
runners: ${{ steps.builder.outputs.runners }}
18+
steps:
19+
- name: Build Matrix
20+
id: builder
21+
uses: regolith-linux/actions/build-matrix@main
22+
with:
23+
name: "${{ github.event.repository.name }}"
24+
ref: "${{ github.ref_name }}"
25+
arch: "amd64 arm64"
26+
stage: "testing"
27+
28+
build:
29+
runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }}
30+
needs: matrix-builder
31+
container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}"
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }}
36+
env:
37+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
38+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
43+
- name: Import GPG Key
44+
uses: regolith-linux/actions/import-gpg@main
45+
with:
46+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
47+
48+
- name: Build Package
49+
id: build
50+
uses: regolith-linux/actions/build-package@main
51+
with:
52+
name: "${{ github.event.repository.name }}"
53+
distro: "${{ matrix.distro }}"
54+
codename: "${{ matrix.codename }}"
55+
stage: "testing"
56+
suite: "testing"
57+
component: "main"
58+
arch: "${{ matrix.arch }}"
59+
60+
- name: Setup SSH
61+
uses: regolith-linux/actions/setup-ssh@main
62+
with:
63+
ssh-host: "${{ env.server-address }}"
64+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
65+
66+
- name: Upload Package
67+
uses: regolith-linux/actions/upload-files@main
68+
with:
69+
upload-to-folder: "${{ github.event.repository.name }}"
70+
71+
- name: Upload SourceLog
72+
uses: regolith-linux/actions/upload-files@main
73+
with:
74+
upload-from: "${{ steps.build.outputs.buildlog-path }}"
75+
upload-pattern: "SOURCELOG_*.txt"
76+
upload-to-base: "/opt/archives/workspace/"
77+
upload-to-folder: "${{ github.event.repository.name }}"
78+
79+
sources:
80+
runs-on: ubuntu-24.04
81+
needs: build
82+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
83+
if: ${{ !failure() && !cancelled() }}
84+
env:
85+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
86+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
87+
steps:
88+
- name: Import GPG Key
89+
uses: regolith-linux/actions/import-gpg@main
90+
with:
91+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
92+
93+
- name: Setup SSH
94+
uses: regolith-linux/actions/setup-ssh@main
95+
with:
96+
ssh-host: "${{ env.server-address }}"
97+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
98+
99+
- name: Rebuild Sources
100+
uses: regolith-linux/actions/rebuild-sources@main
101+
with:
102+
workspace-subfolder: "${{ github.event.repository.name }}"
103+
only-component: "testing"
104+
only-package: "${{ github.event.repository.name }}"
105+
106+
publish:
107+
runs-on: ubuntu-24.04
108+
needs: sources
109+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
110+
if: ${{ !failure() && !cancelled() }}
111+
env:
112+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
113+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
114+
steps:
115+
- name: Setup SSH
116+
uses: regolith-linux/actions/setup-ssh@main
117+
with:
118+
ssh-host: "${{ env.server-address }}"
119+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
120+
121+
- name: Publish Repo
122+
uses: regolith-linux/actions/publish-repo@main
123+
with:
124+
packages-path-subfolder: "${{ github.event.repository.name }}"
125+
only-component: "testing"
126+
127+
manifests:
128+
runs-on: ubuntu-24.04
129+
needs: [matrix-builder, publish]
130+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
131+
if: ${{ !failure() && !cancelled() }}
132+
steps:
133+
- name: Update Manifests
134+
uses: regolith-linux/actions/update-manifest@main
135+
env:
136+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
137+
with:
138+
name: "${{ github.event.repository.name }}"
139+
repo: "${{ github.server_url }}/${{ github.repository }}.git"
140+
ref: "${{ github.ref_name }}"
141+
sha: "${{ github.sha }}"
142+
matrix: "${{ needs.matrix-builder.outputs.includes }}"
143+
suite: "testing"
144+
component: "main"
+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: Publish to Unstable
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
matrix-builder:
15+
runs-on: ubuntu-24.04
16+
outputs:
17+
includes: ${{ steps.builder.outputs.includes }}
18+
runners: ${{ steps.builder.outputs.runners }}
19+
steps:
20+
- name: Build Matrix
21+
id: builder
22+
uses: regolith-linux/actions/build-matrix@main
23+
with:
24+
name: "${{ github.event.repository.name }}"
25+
ref: "main"
26+
arch: "amd64 arm64"
27+
stage: "unstable"
28+
29+
build:
30+
runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }}
31+
needs: matrix-builder
32+
container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}"
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }}
37+
env:
38+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
39+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
44+
- name: Import GPG Key
45+
uses: regolith-linux/actions/import-gpg@main
46+
with:
47+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
48+
49+
- name: Build Package
50+
id: build
51+
uses: regolith-linux/actions/build-package@main
52+
with:
53+
name: "${{ github.event.repository.name }}"
54+
distro: "${{ matrix.distro }}"
55+
codename: "${{ matrix.codename }}"
56+
stage: "unstable"
57+
suite: "unstable"
58+
component: "main"
59+
arch: "${{ matrix.arch }}"
60+
61+
- name: Setup SSH
62+
uses: regolith-linux/actions/setup-ssh@main
63+
with:
64+
ssh-host: "${{ env.server-address }}"
65+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
66+
67+
- name: Upload Package
68+
uses: regolith-linux/actions/upload-files@main
69+
with:
70+
upload-to-folder: "${{ github.event.repository.name }}"
71+
72+
- name: Upload SourceLog
73+
uses: regolith-linux/actions/upload-files@main
74+
with:
75+
upload-from: "${{ steps.build.outputs.buildlog-path }}"
76+
upload-pattern: "SOURCELOG_*.txt"
77+
upload-to-base: "/opt/archives/workspace/"
78+
upload-to-folder: "${{ github.event.repository.name }}"
79+
80+
sources:
81+
runs-on: ubuntu-24.04
82+
needs: build
83+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
84+
if: ${{ !failure() && !cancelled() }}
85+
env:
86+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
87+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
88+
steps:
89+
- name: Import GPG Key
90+
uses: regolith-linux/actions/import-gpg@main
91+
with:
92+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
93+
94+
- name: Setup SSH
95+
uses: regolith-linux/actions/setup-ssh@main
96+
with:
97+
ssh-host: "${{ env.server-address }}"
98+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
99+
100+
- name: Rebuild Sources
101+
uses: regolith-linux/actions/rebuild-sources@main
102+
with:
103+
workspace-subfolder: "${{ github.event.repository.name }}"
104+
only-component: "unstable"
105+
only-package: "${{ github.event.repository.name }}"
106+
107+
publish:
108+
runs-on: ubuntu-24.04
109+
needs: sources
110+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
111+
if: ${{ !failure() && !cancelled() }}
112+
env:
113+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
114+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
115+
steps:
116+
- name: Setup SSH
117+
uses: regolith-linux/actions/setup-ssh@main
118+
with:
119+
ssh-host: "${{ env.server-address }}"
120+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
121+
122+
- name: Publish Repo
123+
uses: regolith-linux/actions/publish-repo@main
124+
with:
125+
packages-path-subfolder: "${{ github.event.repository.name }}"
126+
only-component: "unstable"
127+
128+
manifests:
129+
runs-on: ubuntu-24.04
130+
needs: [matrix-builder, publish]
131+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
132+
if: ${{ !failure() && !cancelled() }}
133+
steps:
134+
- name: Update Manifests
135+
uses: regolith-linux/actions/update-manifest@main
136+
env:
137+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
138+
with:
139+
name: "${{ github.event.repository.name }}"
140+
repo: "${{ github.server_url }}/${{ github.repository }}.git"
141+
ref: "main"
142+
sha: "${{ github.sha }}"
143+
matrix: "${{ needs.matrix-builder.outputs.includes }}"
144+
suite: "unstable"
145+
component: "main"

‎.github/workflows/test-pr.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test Pull Request
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
matrix-builder:
13+
runs-on: ubuntu-24.04
14+
outputs:
15+
includes: ${{ steps.builder.outputs.includes }}
16+
runners: ${{ steps.builder.outputs.runners }}
17+
steps:
18+
- name: Build Matrix
19+
id: builder
20+
uses: regolith-linux/actions/build-matrix@main
21+
with:
22+
name: "${{ github.event.repository.name }}"
23+
ref: "${{ github.base_ref }}" # build for target branch of the pull request
24+
arch: "amd64" # only test on amd64 on pull requests
25+
stage: "unstable"
26+
27+
build:
28+
runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }}
29+
needs: matrix-builder
30+
container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}"
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }}
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Build Package
40+
uses: regolith-linux/actions/build-package@main
41+
with:
42+
only-build: "true"
43+
name: "${{ github.event.repository.name }}"
44+
distro: "${{ matrix.distro }}"
45+
codename: "${{ matrix.codename }}"
46+
stage: "unstable"
47+
suite: "unstable"
48+
component: "main"
49+
arch: "${{ matrix.arch }}"

0 commit comments

Comments
 (0)
Please sign in to comment.