Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync up with main #7

Merged
merged 6 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions .github/workflows/push_images.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: build-ublue

on:
pull_request:
merge_group:
schedule:
- cron: '0 15 * * *' # 3pm UTC everyday (timed against official fedora container pushes)
workflow_dispatch:

env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
build_all_images:
build:
name: Build
runs-on: ubuntu-22.04
permissions:
Expand All @@ -19,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64] #add ,arm64 to add back arm build
arch: [amd64, arm64]
version: [40, rawhide]
flavor: [base, silverblue]
steps:
Expand Down Expand Up @@ -62,13 +64,13 @@ jobs:
id: meta
with:
images: |
COSMIC-${{ matrix.flavor }}
cosmic-${{ matrix.flavor }}
labels: |
org.opencontainers.image.title=COSMIC-${{ matrix.flavor }}
org.opencontainers.image.title=cosmic-${{ matrix.flavor }}
org.opencontainers.image.version=${{ matrix.version }}
org.opencontainers.image.description=${{ env.description }}
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ryanabx/fedora-cosmic-atomic/main/README.md
io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/56272643?s=200&v=4
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/cosmic/main/README.md
io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4

- name: Install qemu dependency
run: |
Expand All @@ -82,29 +84,42 @@ jobs:
with:
containerfiles: |
Containerfile
image: COSMIC-${{ matrix.flavor }}
image: cosmic-${{ matrix.flavor }}
tags: |
${{ steps.generate-tags.outputs.alias_tags }}
archs: ${{ matrix.arch }}
build-args: |
IMAGE_MAJOR_VERSION=${{ matrix.version }}
FLAVOR=${{ matrix.flavor }}
FEDORA_MAJOR_VERSION=${{ matrix.version }}
SOURCE_IMAGE=${{ matrix.flavor }}
oci: false

- name: 'Login to GitHub Container Registry'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Push the image to GHCR (Image Registry)
- name: Push To GHCR
uses: redhat-actions/push-to-registry@v2
if: github.event_name != 'pull_request'
id: push
with:
registry: ${{ env.IMAGE_REGISTRY }}
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
extra-args: |
--disable-content-trust

# Sign container
- uses: sigstore/[email protected]
if: github.event_name != 'pull_request'

- name: Sign container image
if: github.event_name != 'pull_request'
run: |
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.registry_case.outputs.lowercase }}/${{ steps.build_image.outputs.image }}@${TAGS}
env:
TAGS: ${{ steps.push.outputs.outputs && fromJSON(steps.push.outputs.outputs).digest }}
COSIGN_EXPERIMENTAL: false
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}
19 changes: 12 additions & 7 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ARG FLAVOR=main
ARG BASE_IMAGE=quay.io/fedora-ostree-desktops/${FLAVOR}
ARG IMAGE_MAJOR_VERSION=40
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-main}"
ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops}"
ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"

FROM ${BASE_IMAGE}:${IMAGE_MAJOR_VERSION}
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION}

# Setup Copr repo
RUN wget https://copr.fedorainfracloud.org/coprs/ryanabx/cosmic-epoch/repo/fedora-40/ryanabx-cosmic-epoch-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_ryanabx-cosmic.repo
Expand All @@ -11,9 +12,13 @@ RUN wget https://copr.fedorainfracloud.org/coprs/ryanabx/cosmic-epoch/repo/fedor
RUN rpm-ostree install cosmic-epoch

# Install extras (currently just a power manager and a libsecret manager)
RUN rpm-ostree install tuned gnome-keyring
RUN rpm-ostree install \
tuned \
gnome-keyring

# Set up display manager
RUN rm -f /etc/systemd/system/display-manager.service && ln -s /usr/lib/systemd/system/cosmic-greeter.service /etc/systemd/system/display-manager.service
RUN rm -f /etc/systemd/system/display-manager.service && \
ln -s /usr/lib/systemd/system/cosmic-greeter.service /etc/systemd/system/display-manager.service

RUN rpm-ostree cleanup -m && ostree container commit
RUN ostree container commit && \
mkdir -p /var/tmp && chmod -R 1777 /var/tmp
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ Disable SELinux (edit `/etc/selinux/config`, set from `enforcing` to `permissive

Run this command:

sudo rpm-ostree rebase ostree-image-signed:docker://:ghcr.io/ublue-os/cosmic-base:40-amd64
```
$ sudo rpm-ostree rebase ostree-image-signed:docker://:ghcr.io/ublue-os/cosmic-base:40-amd64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ sudo rpm-ostree rebase ostree-image-signed:docker://:ghcr.io/ublue-os/cosmic-base:40-amd64
$ sudo rpm-ostree rebase ostree-image-signed:docker://ghcr.io/ublue-os/cosmic-base:40-amd64

```

Or this command if you're running an arm device:

sudo rpm-ostree rebase ostree-image-signed:docker://:ghcr.io/ublue-os/cosmic-base:40-arm64
```
$ sudo rpm-ostree rebase ostree-image-signed:docker://:ghcr.io/ublue-os/cosmic-base:40-arm64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ sudo rpm-ostree rebase ostree-image-signed:docker://:ghcr.io/ublue-os/cosmic-base:40-arm64
$ sudo rpm-ostree rebase ostree-image-signed:docker://ghcr.io/ublue-os/cosmic-base:40-arm64

```

Reboot

Expand All @@ -32,7 +36,7 @@ Log in with your username and password, then run:
sudo systemctl enable cosmic-greeter.service

### Neofetch
![Neofetch of COSMIC desktop in Fedora](./screenshot/1.png)
![Neofetch of COSMIC desktop in Fedora](./screenshot/cosmic-neofetch.png)

### Issues

Expand Down
File renamed without changes
Loading