mirror of
https://github.com/kairos-io/packages.git
synced 2025-08-14 22:25:08 +00:00
Push one package (#240)
This commit is contained in:
parent
aa3166ab33
commit
f61e479763
73
.github/workflows/one.yaml
vendored
Normal file
73
.github/workflows/one.yaml
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
name: Build just one package and push it to repo
|
||||
concurrency:
|
||||
group: "one-build"
|
||||
#cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
description: 'Package to build'
|
||||
required: true
|
||||
arch:
|
||||
required: false
|
||||
default: "amd64"
|
||||
description: 'Arch to build for'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARCH: ${{ github.event.inputs.arch }}
|
||||
steps:
|
||||
- name: Set final repo
|
||||
run: |
|
||||
FINAL_REPO=quay.io/kairos/packages
|
||||
if [[ "${{ github.event.inputs.arch }}" == "arm64"; then
|
||||
FINAL_REPO=quay.io/kairos/packages-arm64
|
||||
fi
|
||||
|
||||
echo "FINAL_REPO=$FINAL_REPO" >> "$GITHUB_ENV"
|
||||
echo "$GITHUB_ENV"
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
mkdir build
|
||||
- name: Download meta 🔧
|
||||
uses: luet-lab/luet-github-action@master
|
||||
with:
|
||||
FINAL_REPO: ${{ env.action_state }}
|
||||
REPOSITORY_TYPE: docker
|
||||
downloadAllMeta: true
|
||||
downloadFromList: true
|
||||
downloadMeta: true
|
||||
- name: Release space from worker
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
||||
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
||||
- name: Build packages 🔧
|
||||
uses: luet-lab/luet-github-action@master
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
build: true
|
||||
fromIndex: true
|
||||
onlyMissing: false
|
||||
CURRENT_PACKAGE: ${{ github.event.inputs.package }}
|
||||
FINAL_REPO: ${{ env.action_state }}
|
||||
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
|
||||
DOCKER_ENDPOINT: quay.io
|
||||
REPOSITORY_TYPE: docker
|
||||
pushFinalImages: true
|
||||
pushCache: true
|
||||
values: values/${{ github.event.inputs.arch }}.yaml
|
||||
- name: Create repo 🔧
|
||||
uses: luet-lab/luet-github-action@master
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
FINAL_REPO: ${{ env.action_state }}
|
||||
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
|
||||
DOCKER_ENDPOINT: quay.io
|
||||
REPOSITORY_TYPE: docker
|
||||
createRepo: true
|
||||
pushCache: true
|
Loading…
Reference in New Issue
Block a user