idkyet-builder-action/action.yml

59 lines
2 KiB
YAML
Raw Normal View History

2023-08-24 15:15:44 +02:00
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
2023-08-24 16:18:33 +02:00
sb_db_key:
description: 'secure_boot db key to sign efi'
2023-08-24 16:26:08 +02:00
required: false
2023-08-24 16:18:33 +02:00
sb_db_pem:
description: 'secure_boot db pem to sign efi'
2023-08-24 16:26:08 +02:00
required: false
2023-08-24 15:15:44 +02:00
#outputs:
# hashes:
# description: 'json dict of hashes of all files'
runs:
2023-10-13 22:34:39 +02:00
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 images
uses: docker://git.fml128.ch/fml128/idkyet-builder:latest
2023-10-13 23:05:27 +02:00
args:
- build
2023-10-13 22:34:39 +02:00
- 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" \
2023-10-13 23:23:03 +02:00
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}/$f"
2023-10-13 22:34:39 +02:00
done
- name: If failure delete packages
if: failure()
run: |
curl --user "${{ gitea.actor }}:${{ secrets.PACKET_TOKEN }}" \
-X DELETE \
2023-10-13 23:23:03 +02:00
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}"
2023-10-13 22:34:39 +02:00
- name: Save aur cache
id: cache-aur-save
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 }}