-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: create cosmic dekstop base image
- Loading branch information
Showing
8 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 2 |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @p5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
|
||
// Use the basic Renovate preset, and allow settings to be overridden | ||
"extends": [ | ||
"config:best-practices" | ||
], | ||
|
||
"packageRules": [ | ||
{ | ||
// Automatically update any GitHub Actions packages through minor and patch upgrades | ||
"automerge": true, | ||
"matchUpdateTypes": ["minor", "patch", "pin", "digest", "pinDigest"], | ||
"matchManagers": [ | ||
"github-actions" | ||
] | ||
} | ||
], | ||
|
||
"dockerfile": { | ||
"enabled": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build Images | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 */12 * * *" | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
fedora-version: [40] | ||
desktop-environment: [cosmic] | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
env: | ||
IMAGE_NAME: eternal-linux/base/${{ matrix.desktop-environment }} | ||
FEDORA_VERSION: ${{ matrix.fedora-version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Generate Image Tags | ||
uses: rsturla/eternal-main/.github/actions/generate-image-tags | ||
with: | ||
image-name: ${{ env.IMAGE_REGISTRY}}/${{ env.IMAGE_NAME }} | ||
major-version: ${{ env.FEDORA_VERSION }} | ||
is-release: ${{ github.event_name != 'pull_request' }} | ||
|
||
- name: Build Image | ||
uses: rsturla/eternal-main/.github/actions/build-image | ||
with: | ||
builder: docker | ||
context: ./desktop-environments/${{ matrix.desktop-environment }} | ||
image-name: ${{ env.IMAGE_NAME }} | ||
image-tag: | | ||
${{ steps.generate-image-tags.outputs.tags }} | ||
build-args: | | ||
FEDORA_VERSION=${{ env.FEDORA_VERSION }} | ||
- name: Push Image | ||
uses: rsturla/eternal-main/.github/actions/push-image | ||
with: | ||
builder: ${{ steps.build-image.outputs.builder }} | ||
image-name: ${{ steps.build.outputs.image }} | ||
image-tags: ${{ steps.build.outputs.tags }} | ||
image-registry: ${{ env.IMAGE_REGISTRY }} | ||
registry-username: ${{ github.actor }} | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Renovate CI | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/renovate.json5" | ||
- ".github/workflows/renovate.yml" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/renovate.json5" | ||
- ".github/workflows/renovate.yml" | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
|
||
- name: Validate Renovate Configuration | ||
uses: ./.github/actions/validate-renovate-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ARG FEDORA_VERSION=40 | ||
ARG FEDORA_EDITION=base | ||
ARG FEDORA_IMAGE=quay.io/fedora-ostree-desktops/${FEDORA_EDITION}:${FEDORA_VERSION} | ||
|
||
FROM ${FEDORA_IMAGE} | ||
|
||
COPY files/ / | ||
|
||
RUN rpm-ostree install \ | ||
cosmic-desktop \ | ||
gnome-keyring | ||
|
||
RUN rm -f /etc/systemd/system/display-manager.service && \ | ||
ln -s /usr/lib/systemd/system/cosmic-greeter.service /etc/systemd/system/display-manager.service \ | ||
&& \ | ||
systemctl enable greetd-workaround.service \ | ||
&& \ | ||
rpm-ostree cleanup -m && \ | ||
rm -rf /tmp/* /var/* && \ | ||
ostree container commit |
10 changes: 10 additions & 0 deletions
10
desktop-environments/cosmic/files/etc/yum.repos.d/ryanabx-cosmic-epoch.repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[copr:copr.fedorainfracloud.org:ryanabx:cosmic-epoch] | ||
name=Copr repo for cosmic-epoch owned by ryanabx | ||
baseurl=https://download.copr.fedorainfracloud.org/results/ryanabx/cosmic-epoch/fedora-$releasever-$basearch/ | ||
type=rpm-md | ||
skip_if_unavailable=True | ||
gpgcheck=1 | ||
gpgkey=https://download.copr.fedorainfracloud.org/results/ryanabx/cosmic-epoch/pubkey.gpg | ||
repo_gpgcheck=0 | ||
enabled=1 | ||
enabled_metadata=1 |
21 changes: 21 additions & 0 deletions
21
desktop-environments/cosmic/files/usr/lib/systemd/system/greetd-workaround.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description=Workaround for SELinux issues for greetd | ||
ConditionFileIsExecutable=/usr/bin/greetd | ||
After=local-fs.target | ||
|
||
[Service] | ||
Type=oneshot | ||
# Copy if it doesn't exist | ||
ExecStartPre=/usr/bin/mkdir -p /usr/local/bin/overrides | ||
ExecStartPre=/usr/bin/bash -c "[ -x /usr/local/bin/overrides/greetd ] || /usr/bin/cp /usr/bin/greetd /usr/local/bin/overrides/greetd" | ||
# This is faster than using .mount unit. Also allows for the previous line/cleanup | ||
ExecStartPre=/usr/bin/bash -c "/usr/bin/mount --bind /usr/local/bin/overrides/greetd /usr/bin/greetd" | ||
# Fix caps | ||
ExecStart=/usr/bin/bash -c "/usr/sbin/restorecon -rv /usr/bin/greetd" | ||
# Clean-up after ourselves | ||
ExecStop=/usr/bin/umount /usr/bin/greetd | ||
ExecStop=/usr/bin/rm /usr/local/bin/overrides/greetd | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |