mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 19:07:54 +01:00
fix: tags not properly being set in ostree remote (#6)
* fix: tags are now properly set in remote after install * refactor: kinoite variant is better as a default except for silverblue * refactor: use docker to build ISO --------- Co-authored-by: Benjamin Sherman <benjamin@holyarmy.org>
This commit is contained in:
parent
8e91767f92
commit
70bc2264ba
7 changed files with 132 additions and 73 deletions
84
.github/workflows/isogenerator-image.yml
vendored
Normal file
84
.github/workflows/isogenerator-image.yml
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
name: isogenerator-image
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: isogenerator
|
||||
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}"
|
||||
|
||||
jobs:
|
||||
push-image:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
# Checkout push-to-registry action GitHub repository
|
||||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Build metadata
|
||||
- name: Image Metadata
|
||||
uses: docker/metadata-action@v4
|
||||
id: meta
|
||||
with:
|
||||
images: |
|
||||
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
labels: |
|
||||
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/main/README.md
|
||||
org.opencontainers.image.description=A container image for generating Universal Blue ISO files
|
||||
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
# set latest tag for default branch
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and Push Image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
check:
|
||||
name: Check build successful
|
||||
if: ${{ !cancelled() }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [push-image]
|
||||
steps:
|
||||
- name: Exit on failure
|
||||
if: ${{ needs.push-image.result == 'failure' || needs.push-image.result == 'skipped' }}
|
||||
shell: bash
|
||||
run: exit 1
|
||||
- name: Exit
|
||||
shell: bash
|
||||
run: exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue