fix: typo in Containerfile #43
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
# Fork of https://github.com/Vanilla-OS/core-image/blob/main/.github/workflows/vib-build.yml. | |
name: build-image | |
on: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | |
push: | |
branches: | |
- main | |
- dev | |
paths-ignore: # don't rebuild if only documentation has changed | |
- "**.md" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and push image | |
runs-on: ubuntu-22.04 | |
continue-on-error: true | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
variant: [container, general, nvidia] | |
desktop: [nogui, xfce, mate, budgie, gnome, plasma] | |
include: | |
- variant: container | |
suffix: '-container' | |
- variant: general | |
suffix: '' | |
- variant: nvidia | |
suffix: '-nvidia' | |
steps: | |
# Checkout push-to-registry action GitHub repository | |
- name: Checkout Push to Registry action | |
uses: actions/checkout@v4 | |
- name: Generate image name | |
run: | | |
REPO_OWNER_LOWERCASE="$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" | |
echo "REPO_OWNER_LOWERCASE=$REPO_OWNER_LOWERCASE" >> "$GITHUB_ENV" | |
echo "IMAGE_NAME=ghcr.io/$REPO_OWNER_LOWERCASE/system-base${{ matrix.suffix }}-${{ matrix.desktop }}" >> "$GITHUB_ENV" | |
- name: Docker meta | |
id: docker_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env. IMAGE_NAME }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Package Registry | |
uses: docker/login-action@v3 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push the Docker image | |
id: push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Containerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max,ignore-error=true | |
platforms: linux/amd64 | |
build-args: | | |
CORE_BRANCH=${{ github.ref_name == 'dev' && 'dev' || 'main' }} | |
VARIANT=${{ matrix.variant }} | |
DESKTOP=${{ matrix.desktop }} | |
provenance: false |