64 lines
2.3 KiB
YAML
64 lines
2.3 KiB
YAML
name: 'idkyet builder'
|
|
description: 'builder for the idkyet linux project'
|
|
inputs:
|
|
layer_config_file:
|
|
description: 'layer config file'
|
|
required: true
|
|
out_dir:
|
|
description: 'out directory'
|
|
required: true
|
|
version:
|
|
description: 'version for release'
|
|
required: true
|
|
sb_db_key:
|
|
description: 'secure_boot db key to sign efi'
|
|
required: false
|
|
sb_db_pem:
|
|
description: 'secure_boot db pem to sign efi'
|
|
required: false
|
|
#outputs:
|
|
# hashes:
|
|
# description: 'json dict of hashes of all files'
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Restore aur cache
|
|
id: cache-aur-restore
|
|
uses: https://code.forgejo.org/actions/cache/restore@v3
|
|
with:
|
|
path: aur
|
|
key: ${{ runner.os }}-${{ github.repository }}-aur-${{ github.run_number }}
|
|
restore-keys: ${{ runner.os }}-${{ github.repository }}-aur-
|
|
- name: Build aur
|
|
if: steps.cache-aur-restore.outputs.cache-hit != 'true'
|
|
uses: https://git.fml128.ch/FML128/idkyet-builder-action/aur@main
|
|
with:
|
|
layer_config_file: layers_config.yml
|
|
- name: Save aur cache
|
|
if: steps.cache-aur-restore.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v3
|
|
with:
|
|
path: aur
|
|
# key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }} #TODO: implement this for better caching
|
|
key: ${{ runner.os }}-${{ github.repository }}-aur-${{ github.run_number }}
|
|
- name: Build images
|
|
uses: docker://git.fml128.ch/fml128/idkyet-builder:latest
|
|
args:
|
|
- build
|
|
- name: Upload Packages
|
|
run: |
|
|
cd ${{ gitea.workspace }}/out
|
|
for f in *;do
|
|
echo "Uploading $f"
|
|
du -sh $f
|
|
curl --user "${{ gitea.actor }}:${{ secrets.PACKET_TOKEN }}" \
|
|
--upload-file "$f" \
|
|
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}/$f"
|
|
done
|
|
- name: If failure delete packages
|
|
if: failure()
|
|
run: |
|
|
curl --user "${{ gitea.actor }}:${{ secrets.PACKET_TOKEN }}" \
|
|
-X DELETE \
|
|
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}"
|
|
|