init
This commit is contained in:
commit
fbe1ac940a
10 changed files with 121 additions and 0 deletions
53
.forgejo/workflows/build_image.yml
Normal file
53
.forgejo/workflows/build_image.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: Build Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: build-image-${{ github.repository }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create Version
|
||||
id: version
|
||||
run: |
|
||||
echo "RELEASE_VERSION=${GITHUB_RUN_NUMBER}${GITHUB_RUN_ATTEMPT}"
|
||||
echo "RELEASE_VERSION=${GITHUB_RUN_NUMBER}${GITHUB_RUN_ATTEMPT}" >> "${GITHUB_OUTPUT}"
|
||||
#TODO: implement better versioning
|
||||
- name: Build or Restore 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: Build images
|
||||
uses: https://git.fml128.ch/FML128/idkyet-builder-action/builder@main
|
||||
with:
|
||||
layer_config_file: layers_config.yml
|
||||
out_dir: ${{ gitea.workspace }}/out
|
||||
version: ${{ steps.version.outputs.RELEASE_VERSION }}
|
||||
sb_db_pem: ${{ secrets.SB_DB_PEM }}
|
||||
sb_db_key: ${{ secrets.SB_DB_KEY }}
|
||||
api_auth_token: ${{ secrets.API_AUTH_TOKEN }}
|
||||
- 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 }}"
|
Loading…
Add table
Add a link
Reference in a new issue