update workflow
This commit is contained in:
parent
c48c28120b
commit
96b1379d6c
|
@ -4,14 +4,9 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
|
||||||
- 'Dockerfile'
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
|
||||||
- 'Dockerfile'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: isogenerator
|
IMAGE_NAME: isogenerator
|
||||||
|
@ -24,55 +19,23 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version:
|
||||||
|
- 38
|
||||||
|
- 39
|
||||||
|
- 40
|
||||||
|
include:
|
||||||
|
- version: 39
|
||||||
|
support: latest
|
||||||
steps:
|
steps:
|
||||||
# Checkout push-to-registry action GitHub repository
|
- name: Build image
|
||||||
- name: Checkout Push to Registry action
|
uses: JasonN3/build-action@action
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# Build metadata
|
|
||||||
- name: Image Metadata
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
id: meta
|
|
||||||
with:
|
with:
|
||||||
images: |
|
image_name: isogenerator
|
||||||
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}
|
image_variant: main
|
||||||
|
version: ${{ matrix.version }}
|
||||||
labels: |
|
support: ${{ matrix.support }}
|
||||||
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/main/README.md
|
signing_key: ${{ secrets.SIGNING_SECRET }}
|
||||||
org.opencontainers.image.description=A container image for generating Universal Blue ISO files
|
continue-on-error: false
|
||||||
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
|
|
||||||
|
|
|
@ -3,21 +3,22 @@ name: Test Generate ISO
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- main
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
paths-ignore:
|
||||||
|
- 'Containerfile'
|
||||||
|
- '*.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
- 'CODEOWNERS'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
env:
|
- main
|
||||||
ARCH: ${{ inputs.ARCH || 'x86_64' }}
|
paths-ignore:
|
||||||
IMAGE_NAME: ${{ inputs.IMAGE_NAME || 'base-main' }}
|
- 'Containerfile'
|
||||||
IMAGE_REPO: ${{ inputs.IMAGE_REPO || 'ghcr.io/ublue-os' }}
|
- '*.md'
|
||||||
IMAGE_TAG: ${{ inputs.IMAGE_TAG || 'latest' }}
|
- 'LICENSE'
|
||||||
VARIANT: ${{ inputs.VARIANT || 'Kinoite' }}
|
- 'CODEOWNERS'
|
||||||
VERSION: ${{ inputs.VERSION || '39' }}
|
|
||||||
WEB_UI: ${{ inputs.WEB_UI || 'false' }}
|
|
||||||
CURR_REPO: ${{ inputs.BUILD_REPO || github.repository }}
|
|
||||||
CURR_REF: ${{ inputs.BUILD_REF || github.ref }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-iso:
|
build-and-push-iso:
|
||||||
|
@ -39,5 +40,5 @@ jobs:
|
||||||
VARIANT: 'Kinoite'
|
VARIANT: 'Kinoite'
|
||||||
VERSION: '39'
|
VERSION: '39'
|
||||||
WEB_UI: 'false'
|
WEB_UI: 'false'
|
||||||
CURR_REPO: ${{ github.repository }}
|
ACTION_REPO: ${{ github.repository }}
|
||||||
CURR_REF: ${{ github.ref }}
|
ACTION_REF: ${{ github.ref }}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
ARG version=39
|
ARG VERSION=39
|
||||||
|
|
||||||
FROM fedora:${version}
|
FROM fedora:${VERSION}
|
||||||
|
|
||||||
ENV ARCH="x86_64"
|
ENV ARCH="x86_64"
|
||||||
ENV IMAGE_NAME="base-main"
|
ENV IMAGE_NAME="base-main"
|
||||||
ENV IMAGE_REPO="ghcr.io/ublue-os"
|
ENV IMAGE_REPO="ghcr.io/ublue-os"
|
||||||
ENV IMAGE_TAG="${version}"
|
ENV IMAGE_TAG="${VERSION}"
|
||||||
ENV VARIANT="Kinoite"
|
ENV VARIANT="Kinoite"
|
||||||
ENV VERSION="${version}"
|
ENV VERSION="${VERSION}"
|
||||||
ENV WEB_UI="false"
|
ENV WEB_UI="false"
|
||||||
|
|
||||||
COPY / /isogenerator
|
COPY / /isogenerator
|
||||||
|
|
12
action.yml
12
action.yml
|
@ -30,12 +30,12 @@ inputs:
|
||||||
description: Enable Anaconda WebUI
|
description: Enable Anaconda WebUI
|
||||||
required: true
|
required: true
|
||||||
default: "false"
|
default: "false"
|
||||||
BUILD_REPO:
|
ACTION_REPO:
|
||||||
description: Repository with the build tool
|
description: Repository with the build action
|
||||||
required: false
|
required: false
|
||||||
default: ${{ github.repository }}
|
default: ${{ github.repository }}
|
||||||
BUILD_REF:
|
ACTION_REF:
|
||||||
description: Repository ref for the build tool
|
description: Repository ref for the build action
|
||||||
required: false
|
required: false
|
||||||
default: ${{ github.ref }}
|
default: ${{ github.ref }}
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ runs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ inputs.BUILD_REPO }}
|
repository: ${{ inputs.ACTION_REPO }}
|
||||||
ref: ${{ inputs.BUILD_REF }}
|
ref: ${{ inputs.ACTION_REF }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
Loading…
Reference in New Issue