changes for new builder
This commit is contained in:
parent
0438a90aec
commit
44a05d53c2
2 changed files with 33 additions and 3 deletions
28
action.yml
28
action.yml
|
@ -10,12 +10,21 @@ inputs:
|
||||||
version:
|
version:
|
||||||
description: 'version for release'
|
description: 'version for release'
|
||||||
required: true
|
required: true
|
||||||
|
registry_username:
|
||||||
|
description: 'username for registry'
|
||||||
|
required: true
|
||||||
|
registry_password:
|
||||||
|
description: 'password for registry'
|
||||||
|
required: true
|
||||||
sb_db_key:
|
sb_db_key:
|
||||||
description: 'secure_boot db key to sign efi'
|
description: 'secure_boot db key to sign efi'
|
||||||
required: false
|
required: false
|
||||||
sb_db_pem:
|
sb_db_pem:
|
||||||
description: 'secure_boot db pem to sign efi'
|
description: 'secure_boot db pem to sign efi'
|
||||||
required: false
|
required: false
|
||||||
|
api_auth_token:
|
||||||
|
description: 'api_auth_token if needed to download base images'
|
||||||
|
required: false
|
||||||
#outputs:
|
#outputs:
|
||||||
# hashes:
|
# hashes:
|
||||||
# description: 'json dict of hashes of all files'
|
# description: 'json dict of hashes of all files'
|
||||||
|
@ -24,22 +33,35 @@ runs:
|
||||||
steps:
|
steps:
|
||||||
- name: Restore and build aur
|
- name: Restore and build aur
|
||||||
uses: ./aur
|
uses: ./aur
|
||||||
|
with:
|
||||||
|
layer_config_file: ${{ inputs.layer_config_file }}
|
||||||
- name: Build images
|
- name: Build images
|
||||||
uses: ./builder
|
uses: ./builder
|
||||||
|
with:
|
||||||
|
layer_config_file: ${{ inputs.layer_config_file }}
|
||||||
|
out_dir: ${{ inputs.out_dir }}
|
||||||
|
registry_username: ${{ inputs.registry_username }}
|
||||||
|
registry_password: ${{ inputs.registry_password }}
|
||||||
|
version: ${{ inputs.version }}
|
||||||
|
sb_db_key: ${{ inputs.sb_db_key }}
|
||||||
|
sb_db_pem: ${{ inputs.sb_db_pem }}
|
||||||
|
api_auth_token: ${{ inputs.api_auth_token }}
|
||||||
|
|
||||||
- name: Upload Packages
|
- name: Upload Packages
|
||||||
run: |
|
run: |
|
||||||
cd ${{ gitea.workspace }}/out
|
cd ${{ gitea.workspace }}/out
|
||||||
for f in *;do
|
for f in *;do
|
||||||
echo "Uploading $f"
|
echo "Uploading $f"
|
||||||
du -sh $f
|
du -sh $f
|
||||||
curl --user "${{ gitea.actor }}:${{ secrets.PACKET_TOKEN }}" \
|
curl --user "${{ inputs.registry_username }}:${{ inputs.registry_password }}" \
|
||||||
--upload-file "$f" \
|
--upload-file "$f" \
|
||||||
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}/$f"
|
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}/$f"
|
||||||
done
|
done
|
||||||
|
shell: bash
|
||||||
- name: If failure delete packages
|
- name: If failure delete packages
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
curl --user "${{ gitea.actor }}:${{ secrets.PACKET_TOKEN }}" \
|
curl --user "${{ inputs.registry_username }}:${{ inputs.registry_password }}" \
|
||||||
-X DELETE \
|
-X DELETE \
|
||||||
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}"
|
"https://git.fml128.ch/api/packages/${{ github.repository_owner }}/generic/${GITHUB_REPOSITORY#*/}/${{ steps.version.outputs.RELEASE_VERSION }}"
|
||||||
|
shell: bash
|
|
@ -10,6 +10,12 @@ inputs:
|
||||||
version:
|
version:
|
||||||
description: 'version for release'
|
description: 'version for release'
|
||||||
required: true
|
required: true
|
||||||
|
registry_username:
|
||||||
|
description: 'username for registry'
|
||||||
|
required: true
|
||||||
|
registry_password:
|
||||||
|
description: 'password for registry'
|
||||||
|
required: true
|
||||||
sb_db_key:
|
sb_db_key:
|
||||||
description: 'secure_boot db key to sign efi'
|
description: 'secure_boot db key to sign efi'
|
||||||
required: false
|
required: false
|
||||||
|
@ -33,6 +39,8 @@ runs:
|
||||||
env:
|
env:
|
||||||
INPUT_VERSION: ${{ inputs.version }}
|
INPUT_VERSION: ${{ inputs.version }}
|
||||||
INPUT_OUT_DIR: ${{ inputs.out_dir }}
|
INPUT_OUT_DIR: ${{ inputs.out_dir }}
|
||||||
|
INPUT_REGISTRY_USERNAME: ${{ inputs.registry_username }}
|
||||||
|
INPUT_REGISTRY_PASSWORD: ${{ inputs.registry_password }}
|
||||||
INPUT_SB_DB_KEY: ${{ inputs.sb_db_key }}
|
INPUT_SB_DB_KEY: ${{ inputs.sb_db_key }}
|
||||||
INPUT_SB_DB_PEM: ${{ inputs.sb_db_pem }}
|
INPUT_SB_DB_PEM: ${{ inputs.sb_db_pem }}
|
||||||
INPUT_API_AUTH_TOKEN: ${{ inputs.api_auth_token }}
|
INPUT_API_AUTH_TOKEN: ${{ inputs.api_auth_token }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue