Added new action
This commit is contained in:
parent
109119a05d
commit
04c0bd3916
2 changed files with 79 additions and 8 deletions
57
action.yml
57
action.yml
|
@ -20,11 +20,52 @@ inputs:
|
||||||
# hashes:
|
# hashes:
|
||||||
# description: 'json dict of hashes of all files'
|
# description: 'json dict of hashes of all files'
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: "composite"
|
||||||
image: docker://git.fml128.ch/fml128/idkyet-builder:latest
|
steps:
|
||||||
args:
|
- name: Restore aur cache
|
||||||
- ${{ inputs.layer_config_file }}
|
id: cache-aur-restore
|
||||||
- ${{ inputs.out_dir }}
|
uses: https://code.forgejo.org/actions/cache/restore@v3
|
||||||
- ${{ inputs.version }}
|
with:
|
||||||
- ${{ inputs.sb_db_key }}
|
path: aur
|
||||||
- ${{ inputs.sb_db_pem }}
|
key: ${{ runner.os }}-${{ github.repository }}-aur-${{ github.run_number }}
|
||||||
|
restore-keys: ${{ runner.os }}-${{ github.repository }}-aur-
|
||||||
|
# - name: Build images
|
||||||
|
# uses: ./actions/builder.yml
|
||||||
|
# with:
|
||||||
|
# layer_config_file: ${{ inputs.layer_config_file }}
|
||||||
|
# out_dir: ${{ inputs.out_dir }}
|
||||||
|
# version: ${{ inputs.version }}
|
||||||
|
# sb_db_pem: ${{ inputs.sb_db_pem }}
|
||||||
|
# sb_db_key: ${{ inputs.sb_db_key }}
|
||||||
|
- name: Build images
|
||||||
|
uses: docker://git.fml128.ch/fml128/idkyet-builder:latest
|
||||||
|
args: build
|
||||||
|
env:
|
||||||
|
layer_config_file: ${{ inputs.layer_config_file }}
|
||||||
|
out_dir: ${{ inputs.out_dir }}
|
||||||
|
version: ${{ inputs.version }}
|
||||||
|
sb_db_pem: ${{ inputs.sb_db_pem }}
|
||||||
|
sb_db_key: ${{ inputs.sb_db_key }}
|
||||||
|
- 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/fml128/generic/idkyet-fml128/${{ 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/fml128/generic/idkyet-fml128/${{ steps.version.outputs.RELEASE_VERSION }}"
|
||||||
|
- 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 }}
|
||||||
|
|
30
actions/builder.yml
Normal file
30
actions/builder.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
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: docker
|
||||||
|
image: docker://git.fml128.ch/fml128/idkyet-builder:latest
|
||||||
|
args:
|
||||||
|
- ${{ inputs.layer_config_file }}
|
||||||
|
- ${{ inputs.out_dir }}
|
||||||
|
- ${{ inputs.version }}
|
||||||
|
- ${{ inputs.sb_db_key }}
|
||||||
|
- ${{ inputs.sb_db_pem }}
|
Loading…
Add table
Reference in a new issue