Files
electron/.github/workflows/build.yaml
Zakary Timson c8a41aac71
All checks were successful
Build Electron / Build Dockerfile (push) Successful in 29s
Build Electron / Build Electron (push) Successful in 1m31s
Update .github/workflows/build.yaml
2026-02-20 23:51:44 -05:00

57 lines
2.2 KiB
YAML

name: Build Electron
run-name: Build Electron
on:
push:
jobs:
docker:
name: Build Dockerfile
runs-on: ubuntu-latest
container:
image: docker
volumes:
- /tmp/gitea:/tmp/gitea
steps:
- name: Clone Repository
uses: ztimson/actions/clone@develop
- name: Build Image
run: |
REGISTRY=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%%)
docker build -t "$REGISTRY/${{github.repository}}:${{github.ref_name}}" .
- name: Publish Branch Tag
run: |
REGISTRY=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%%)
docker login -u ${{github.repository_owner}} -p ${{secrets.DEPLOY_TOKEN}} $REGISTRY
docker push "$REGISTRY/${{github.repository}}:${{github.ref_name}}"
- name: Publish Latest Tag
run: |
if [ "${{github.ref_name}}" = "master" ]; then
REGISTRY=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%%)
docker tag "$REGISTRY/${{github.repository}}:${{github.ref_name}}" "$REGISTRY/${{github.repository}}:latest"
docker push "$REGISTRY/${{github.repository}}:latest"
fi
electron:
name: Build Electron
runs-on: ubuntu-latest
needs:
- docker
container:
image: git.zakscode.com/ztimson/electron:latest
steps:
- name: Build inside container
run: |
if [ "${{github.ref_name}}" = "master" ]; then
/app/entrypoint.sh
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-darwin-x64.zip \
https://git.zakscode.com/api/packages/ztimson/generic/electron/latest/Momentum-darwin-x64.zip
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-linux-x64.zip \
https://git.zakscode.com/api/packages/ztimson/generic/electron/latest/Momentum-linux-x64.zip
curl -X PUT -H "Authorization: token ${{ secrets.DEPLOY_TOKEN }}" --upload-file /out/Momentum-win32-x64.zip \
https://git.zakscode.com/api/packages/ztimson/generic/electron/latest/Momentum-win32-x64.zip
fi