Skip to content

ci: adopt public actions - #358

Draft
FangcatChina wants to merge 1 commit into
devfrom
public-actions
Draft

FangcatChina wants to merge 1 commit into
devfrom
public-actions

Conversation

@FangcatChina

@FangcatChina FangcatChina commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Depends on Vanilla-OS/differ-gh-action#1, resolves #346, should be merged along with Vanilla-OS/core-image#175

The public actions build images using Buildah with zstd:chunked enabled by default, in order to standardize and simplify our build process.

The actions have been tested in:

Branch rules may need to be updated to adapt new names.

@FangcatChina
FangcatChina marked this pull request as draft November 9, 2026 15:00
@FangcatChina
FangcatChina marked this pull request as ready for review November 14, 2026 06:52
@FangcatChina
FangcatChina requested a review from a team November 14, 2026 06:52
Comment on lines +12 to +16
permissions:
contents: read
packages: write
id-token: write
attestations: write

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine-grained permissions defined per job should be preferred.

GH_TOKEN: ${{ github.token }}

build:
name: Build ${{ matrix.arch }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't the default name already informative enough? Removing it would better align with the single source of truth (SSOT) principle.

path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
- uses: vanilla-os/build-gh-action@main

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be better to rename it to just vanilla-os/build-action, since the syntax is not used exclusively on GitHub.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I named it with the -gh suffix to keep it consistent with our existing vib-gh-action. In that case, we need to rename it as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree. Renaming would align it with the naming convention used by most actions, such as docker/build-push-action and golangci/golangci-lint-action. However, we should handle the rename carefully to avoid breaking existing users. The transition from actions/attest-build-provenance to actions/attest is a good example to follow.

Comment on lines 54 to +72
differ:
runs-on: ubuntu-latest
if: github.repository == 'vanilla-os/desktop-image' && github.ref_type == 'tag'
name: Differ
needs: merge
if: github.repository == 'vanilla-os/desktop-image' && github.ref_type == 'tag'
runs-on: ubuntu-26.04
container:
image: ghcr.io/vanilla-os/gnome:latest

permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v7

- name: Generate package diff
run: |
lpkg --unlock
PACKAGE_LIST=$(.github/gen_package_list.sh)
apt-get install -y curl
IMAGE_DIGEST=$(curl -s -L -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/Vanilla-OS/packages/container/gnome/versions | grep -m1 name | sed -E 's/^\s*"name": "(.+)".*$/\1/')
curl -X POST \
-H 'Accept:application/json' \
-H "Authorization:Basic $(echo -n "${{ secrets.DIFFER_USER }}:${{ secrets.DIFFER_PSW }}" | base64)" \
-d "{\"digest\":\"${IMAGE_DIGEST}\",${PACKAGE_LIST}}" \
${{ vars.DIFFER_URL }}/images/desktop/new
curl -X POST \
-H 'Accept:application/json' \
-H "Authorization:Basic $(echo -n "${{ secrets.DIFFER_USER }}:${{ secrets.DIFFER_PSW }}" | base64)" \
-d "{\"digest\":\"${IMAGE_DIGEST}\",${PACKAGE_LIST}}" \
${{ vars.DIFFER_URL }}/images/gnome/new
lpkg --lock
- uses: vanilla-os/differ-gh-action@main
with:
image: gnome
legacy_image: desktop
differ_url: ${{ vars.DIFFER_URL }}
differ_user: ${{ secrets.DIFFER_USER }}
differ_psw: ${{ secrets.DIFFER_PSW }} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The current differ job is incompatible with multi-arch images, since different architectures contain different packages. To display package information correctly, it would be better to generate an SBOM in build-action for each architecture, eliminating the need for a separate differ-action.

@FangcatChina
FangcatChina marked this pull request as draft November 15, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use zstd:chunked compression

2 participants