Compare commits

..

1 commit

Author SHA1 Message Date
dependabot[bot]
3bb4fb628e
chore(deps): bump actions/attest-build-provenance from 1 to 2
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 1 to 2.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-09 19:50:46 +00:00
4 changed files with 61 additions and 13 deletions

46
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: Release
on:
push:
tags:
- '*'
workflow_dispatch:
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # Allow actions to create release
attestations: write # To create and write attestations
id-token: write # Additional permissions for the persistence of the attestations
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: vanilla-os/vib-gh-action@v0.8.1
with:
recipe: 'recipe.yml'
plugins: 'Vanilla-OS/vib-fsguard:v1.5.3'
- uses: actions/upload-artifact@v4
with:
name: Containerfile
path: Containerfile
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ github.ref_name }}" --generate-notes Containerfile
- name: Attest Release Files
id: attest
uses: actions/attest-build-provenance@v2
with:
subject-path: 'Containerfile'

View file

@ -11,7 +11,7 @@ on:
workflow_dispatch: workflow_dispatch:
env: env:
CUSTOM_IMAGE_NAME: vanilla-os-image CUSTOM_IMAGE_NAME: custom
BUILDX_NO_DEFAULT_ATTESTATIONS: 1 BUILDX_NO_DEFAULT_ATTESTATIONS: 1
jobs: jobs:
@ -44,7 +44,7 @@ jobs:
- name: Get last successful run - name: Get last successful run
if: ${{ github.ref_type == 'branch' }} if: ${{ github.ref_type == 'branch' }}
env: env:
GH_TOKEN: ${{ secrets.GITHUBI_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true continue-on-error: true
run: | run: |
gh run list -b "${{ github.ref_name }}" -w "${{ github.workflow }}" -s "success" -L 1 --json databaseId > last_run.json gh run list -b "${{ github.ref_name }}" -w "${{ github.workflow }}" -s "success" -L 1 --json databaseId > last_run.json
@ -145,7 +145,7 @@ jobs:
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUBI_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push the Docker image - name: Build and Push the Docker image
id: push id: push
@ -162,7 +162,7 @@ jobs:
provenance: false provenance: false
- name: Attest pushed image - name: Attest pushed image
uses: actions/attest-build-provenance@v1 uses: actions/attest-build-provenance@v2
id: attest id: attest
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
with: with:

View file

@ -10,10 +10,10 @@ This template repository is a starting point for creating custom [Vib images](ht
- First, click on the <kbd>Use this template</kbd> button in the top right corner, then from the drop-down menu select <kbd>Create a new repository</kbd>. This would create a new repository with the same files and directories as this repository. - First, click on the <kbd>Use this template</kbd> button in the top right corner, then from the drop-down menu select <kbd>Create a new repository</kbd>. This would create a new repository with the same files and directories as this repository.
- Go to **Settings → Actions → General** and ensure "_Allow all actions and reusable workflows_" are enabled. - Go to **Settings → Actions → General** and ensure "_Allow all actions and reusable workflows_" are enabled.
- Now, clone the repository to your local machine and let's start customizing your image. You can also use the GitHub online editor if you prefer. - Now, clone the repository to your local machine and let's start customizing your image. You can also use the GitHub online editor if you prefer.
- Open the `vib-build.yml` workflow file in the `.github/workflows` folder and replace the custom image name with an image name of your choosing in line 14. - Open the `vib-build.yml` workflow file and replace the custom image name with an image name of your choosing in line 14.
- Open the `recipe.yml` file and replace the image name and ID with your image name and ID in lines 1 and 2. - Open the `recipe.yml` file and replace the image name and ID with your image name and ID in lines 1 and 2.
- Now, perform your additions and modifications to the recipe as per your requirements. - Now, perform your additions and modifications to the recipe as per your requirements.
- If you just want to install `.deb` files, you can just put them in `includes.container/deb-pkgs` (if you choose this option, make sure to keep the .deb file up to date, it will not be upgraded automatically) - If you just want to install `.deb` files, you can just put them in `includes.container/deb-pkgs`
- Optionally, add your modules to the `modules` directory and add them to the package-modules `includes` in `recipe.yml`. - Optionally, add your modules to the `modules` directory and add them to the package-modules `includes` in `recipe.yml`.
- You can check the Actions tab in GitHub to see the build progress of your image. - You can check the Actions tab in GitHub to see the build progress of your image.

View file

@ -1,11 +1,11 @@
name: Yanick Desktop # Replace this name with your image name name: Custom Vanilla Desktop # Replace this name with your image name
id: vanilla-os-image # Replace this ID with your image ID id: custom # Replace this ID with your image ID
stages: stages:
- id: build - id: build
base: ghcr.io/vanilla-os/nvidia:main # Optionally, Replace this image URL with a different one i.e. nvidia:main, etc base: ghcr.io/vanilla-os/desktop:main # Optionally, Replace this image URL with a different one i.e. nvidia:main, etc
singlelayer: false singlelayer: false
labels: labels:
maintainer: ItzYanick # Optionally, Replace this with your name maintainer: self-maintained # Optionally, Replace this with your name
args: args:
DEBIAN_FRONTEND: noninteractive # Set the image environment as non-interactive DEBIAN_FRONTEND: noninteractive # Set the image environment as non-interactive
@ -21,7 +21,7 @@ stages:
- lpkg --unlock - lpkg --unlock
- apt-get update - apt-get update
# Put your custom actions below this comment # Put your custom actions behind this comment
- name: example-packages # Sample module using the built-in Apt module to install packages - name: example-packages # Sample module using the built-in Apt module to install packages
type: apt type: apt
@ -38,8 +38,10 @@ stages:
type: includes type: includes
includes: includes:
- modules/50-install-debs.yml # Sample local module present in this repository - modules/50-install-debs.yml # Sample local module present in this repository
- gh:vanilla-os/dev-image:main:modules/00-basics.yml # Sample GitHub remote module in the format: `gh:your-name/your-repo:branch:modules/file.yml`
# Put your custom actions above this comment - https://raw.githubusercontent.com/Vanilla-OS/dev-image/main/modules/05-go.yml # Sample full URL remote module
# Put your custom actions before this comment
- name: set-image-name-abroot - name: set-image-name-abroot
type: includes type: includes