Update docker-build.yml: run on forgerunner host label, fix doubled image path
Build and Push Docker Image / build (push) Failing after 6s
Build and Push Docker Image / build (push) Failing after 6s
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
# Run directly on the forgerunner host: the bundled Docker CLI and the
|
||||||
container:
|
# mounted /var/run/docker.sock are available, so no nested-container or
|
||||||
image: catthehacker/ubuntu:act-latest
|
# socket juggling is needed.
|
||||||
|
runs-on: host
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -21,5 +24,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
run: |
|
run: |
|
||||||
docker build -t registry.alwisp.com/${{ gitea.repository_owner }}/${{ gitea.repository }}:latest .
|
# gitea.repository is already "owner/repo" (e.g. jason/breedr).
|
||||||
docker push registry.alwisp.com/${{ gitea.repository_owner }}/${{ gitea.repository }}:latest
|
IMAGE="registry.alwisp.com/${{ gitea.repository }}"
|
||||||
|
docker build -t "${IMAGE}:latest" -t "${IMAGE}:${{ gitea.sha }}" .
|
||||||
|
docker push "${IMAGE}:latest"
|
||||||
|
docker push "${IMAGE}:${{ gitea.sha }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user