start9 action
This commit is contained in:
parent
eccb754790
commit
d319c1d4be
1 changed files with 37 additions and 2 deletions
39
.github/workflows/push.yml
vendored
39
.github/workflows/push.yml
vendored
|
|
@ -24,6 +24,12 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -50,6 +56,7 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/lightning-pub:latest
|
ghcr.io/${{ github.repository_owner }}/lightning-pub:latest
|
||||||
ghcr.io/${{ github.repository_owner }}/lightning-pub:master
|
ghcr.io/${{ github.repository_owner }}/lightning-pub:master
|
||||||
|
|
@ -58,8 +65,9 @@ jobs:
|
||||||
- name: Capture image digest
|
- name: Capture image digest
|
||||||
id: capture-digest
|
id: capture-digest
|
||||||
run: |
|
run: |
|
||||||
DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/${{ github.repository_owner }}/lightning-pub:latest | cut -d'@' -f2)
|
# For multi-arch builds, use the digest from build output
|
||||||
echo "Raw Digest is $DIGEST"
|
DIGEST="${{ steps.build-and-push.outputs.digest }}"
|
||||||
|
echo "Multi-arch manifest digest: $DIGEST"
|
||||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Debug Print Digest
|
- name: Debug Print Digest
|
||||||
|
|
@ -71,3 +79,30 @@ jobs:
|
||||||
subject-digest: ${{ steps.capture-digest.outputs.digest }}
|
subject-digest: ${{ steps.capture-digest.outputs.digest }}
|
||||||
subject-name: ghcr.io/${{ github.repository_owner }}/lightning-pub
|
subject-name: ghcr.io/${{ github.repository_owner }}/lightning-pub
|
||||||
push-to-registry: true
|
push-to-registry: true
|
||||||
|
|
||||||
|
- name: Trigger StartOS package build
|
||||||
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||||
|
env:
|
||||||
|
STARTOS_BUILD_TRIGGER: ${{ secrets.STARTOS_BUILD_TRIGGER }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$STARTOS_BUILD_TRIGGER" ]; then
|
||||||
|
echo "⚠️ STARTOS_BUILD_TRIGGER not configured, skipping StartOS build trigger"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🚀 Triggering StartOS package build with digest: ${{ steps.capture-digest.outputs.digest }}"
|
||||||
|
|
||||||
|
curl -X POST \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
-H "Authorization: Bearer $STARTOS_BUILD_TRIGGER" \
|
||||||
|
https://api.github.com/repos/shocknet/start9-LightningPub/dispatches \
|
||||||
|
-d "{
|
||||||
|
\"event_type\": \"docker-image-updated\",
|
||||||
|
\"client_payload\": {
|
||||||
|
\"docker_tag\": \"latest\",
|
||||||
|
\"digest\": \"${{ steps.capture-digest.outputs.digest }}\",
|
||||||
|
\"commit\": \"${{ github.sha }}\"
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
|
||||||
|
echo "✓ StartOS build triggered"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue