Some checks failed
Build & publish Docker images / Build & push all images (push) Failing after 3s
The previous workflow ran jobs inside node:20-bookworm which has no Docker CLI. Re-mapped label to :host and replaced composite actions with direct docker build/push shell commands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Build & publish Docker images
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
release:
|
|
types: [published]
|
|
|
|
env:
|
|
REGISTRY: git.hexadual.io
|
|
|
|
jobs:
|
|
build:
|
|
name: Build & push all images
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to registry
|
|
run: |
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | \
|
|
docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
|
|
|
|
- name: Build & push server
|
|
run: |
|
|
docker build \
|
|
-t ${{ env.REGISTRY }}/rocobo/gcp-dot-server:latest \
|
|
-t ${{ env.REGISTRY }}/rocobo/gcp-dot-server:${{ github.sha }} \
|
|
./server
|
|
docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-server:latest
|
|
docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-server:${{ github.sha }}
|
|
|
|
- name: Build & push egg
|
|
run: |
|
|
docker build \
|
|
-t ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:latest \
|
|
-t ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }} \
|
|
./egg
|
|
docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:latest
|
|
docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }}
|
|
|
|
- name: Logout
|
|
if: always()
|
|
run: docker logout ${{ env.REGISTRY }}
|