Skip to content

Commit 725519f

Browse files
authored
chore: add initial repo workflows (#8)
* chore: add initial repo workflows Signed-off-by: Sonia Sandler <[email protected]> * fix: file name Signed-off-by: Sonia Sandler <[email protected]> * chore: apply reviews Signed-off-by: Sonia Sandler <[email protected]> * chore: apply reviews Signed-off-by: Sonia Sandler <[email protected]> * chore: add EOF Signed-off-by: Sonia Sandler <[email protected]> * chore: fix pr-check workflow and add version to Install pnpm Signed-off-by: Sonia Sandler <[email protected]> * chore: update release workflow to use PODMAN_DESKTOP_BOT_TOKEN for release PR Signed-off-by: Sonia Sandler <[email protected]> * chore: add containerfiles and update workflows Signed-off-by: Sonia Sandler <[email protected]> * chore: update release tag outputs Signed-off-by: Sonia Sandler <[email protected]> * chore: add EOF Signed-off-by: Sonia Sandler <[email protected]> * fix: add missing node module Signed-off-by: Sonia Sandler <[email protected]> --------- Signed-off-by: Sonia Sandler <[email protected]>
1 parent 528cd61 commit 725519f

File tree

6 files changed

+508
-0
lines changed

6 files changed

+508
-0
lines changed

.github/dependabot.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#
2+
# Copyright (C) 2025 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
#
18+
19+
# To get started with Dependabot version updates, you'll need to specify which
20+
# package ecosystems to update and where the package manifests are located.
21+
# Please see the documentation for all configuration options:
22+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
23+
24+
version: 2
25+
updates:
26+
- package-ecosystem: "github-actions"
27+
directory: "/"
28+
schedule:
29+
interval: "daily"
30+
open-pull-requests-limit: 20
31+
32+
- package-ecosystem: "npm"
33+
directory: "/"
34+
schedule:
35+
interval: daily
36+
open-pull-requests-limit: 20
37+
groups:
38+
eslint:
39+
applies-to: version-updates
40+
patterns:
41+
- "eslint"
42+
- "@eslint/*"
43+
typescript-eslint:
44+
applies-to: version-updates
45+
patterns:
46+
- "@typescript-eslint/*"
47+
- "typescript-eslint"

.github/workflows/build-next.yaml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#
2+
# Copyright (C) 2025 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
name: main-build
19+
20+
permissions:
21+
contents: read
22+
packages: write
23+
24+
on:
25+
push:
26+
branches:
27+
- 'main'
28+
29+
jobs:
30+
builder-image:
31+
name: Build and publish builder OCI image
32+
runs-on: ubuntu-24.04
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Install qemu dependency
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y qemu-user-static
41+
42+
- name: build builder image
43+
id: builder-image
44+
uses: redhat-actions/buildah-build@v2
45+
with:
46+
image: podman-desktop-rhel-ext-builder
47+
tags: next ${{ github.sha }}
48+
platforms: linux/amd64, linux/arm64
49+
containerfiles: |
50+
build/Containerfile.builder
51+
context: .
52+
oci: true
53+
54+
- name: Log in to ghcr.io
55+
uses: redhat-actions/podman-login@v1
56+
with:
57+
registry: ghcr.io
58+
username: ${{ github.repository_owner }}
59+
password: ${{ secrets.GITHUB_TOKEN }}
60+
61+
- name: publish builder to ghcr.io
62+
id: push-to-ghcr
63+
uses: redhat-actions/push-to-registry@v2
64+
with:
65+
image: ${{ steps.builder-image.outputs.image }}
66+
tags: ${{ steps.builder-image.outputs.tags }}
67+
registry: ghcr.io/${{ github.repository_owner }}
68+
69+
extension-image:
70+
name: Build and publish extension OCI image
71+
runs-on: ubuntu-24.04
72+
needs: builder-image
73+
74+
steps:
75+
- uses: actions/checkout@v4
76+
77+
- name: Install qemu dependency
78+
run: |
79+
sudo apt-get update
80+
sudo apt-get install -y qemu-user-static
81+
82+
- name: build extension image
83+
id: extension-image
84+
uses: redhat-actions/buildah-build@v2
85+
with:
86+
image: podman-desktop-rhel-ext
87+
tags: next ${{ github.sha }}
88+
archs: amd64, arm64
89+
containerfiles: |
90+
build/Containerfile
91+
context: .
92+
oci: true
93+
94+
- name: Log in to ghcr.io
95+
uses: redhat-actions/podman-login@v1
96+
with:
97+
username: ${{ github.repository_owner }}
98+
password: ${{ secrets.GITHUB_TOKEN }}
99+
registry: ghcr.io
100+
101+
- name: publish extension to ghcr.io
102+
id: push-to-ghcr
103+
uses: redhat-actions/push-to-registry@v2
104+
with:
105+
image: ${{ steps.extension-image.outputs.image }}
106+
tags: ${{ steps.extension-image.outputs.tags }}
107+
registry: ghcr.io/${{ github.repository_owner }}

.github/workflows/pr-check.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#
2+
# Copyright (C) 2025 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
name: pr-check
19+
20+
on: [pull_request]
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
lint-format:
28+
name: linter, formatters
29+
runs-on: ubuntu-24.04
30+
timeout-minutes: 40
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: pnpm/action-setup@v4
34+
name: Install pnpm
35+
with:
36+
version: 10
37+
run_install: false
38+
39+
- uses: actions/setup-node@v4
40+
with:
41+
node-version: 22
42+
cache: 'pnpm'
43+
44+
- name: Execute pnpm
45+
run: pnpm install --frozen-lockfile
46+
47+
- name: Run linter
48+
run: pnpm lint:check
49+
50+
- name: Run formatter
51+
run: pnpm format:check
52+
53+
typecheck:
54+
name: typecheck
55+
runs-on: ubuntu-24.04
56+
timeout-minutes: 40
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: pnpm/action-setup@v4
60+
name: Install pnpm
61+
with:
62+
version: 10
63+
run_install: false
64+
65+
- uses: actions/setup-node@v4
66+
with:
67+
node-version: 22
68+
cache: 'pnpm'
69+
70+
- name: Execute pnpm
71+
run: pnpm install
72+
73+
- name: Run typecheck
74+
run: pnpm typecheck:backend
75+
76+
unit-tests:
77+
name: unit tests / ${{ matrix.os }}
78+
runs-on: ${{ matrix.os }}
79+
timeout-minutes: 40
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
os: [windows-2022, ubuntu-24.04, macos-15]
84+
steps:
85+
- uses: actions/checkout@v4
86+
- uses: pnpm/action-setup@v4
87+
name: Install pnpm
88+
with:
89+
version: 10
90+
run_install: false
91+
92+
- uses: actions/setup-node@v4
93+
with:
94+
node-version: 22
95+
cache: 'pnpm'
96+
97+
- name: Execute pnpm
98+
run: pnpm install
99+
100+
- name: Run unit tests
101+
run: pnpm test

0 commit comments

Comments
 (0)