Skip to content

Commit

Permalink
recon build chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Mar 7, 2024
1 parent 7590334 commit bebbe7d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 34 deletions.
37 changes: 4 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,18 @@ name: build

on:
workflow_dispatch:
schedule:
- cron: '0 6 */6 * *'
push:
branches:
- "main"
paths:
- "Dockerfile"
- "dev/BASE"
workflow_run:
workflows: ["pre-build"]
types:
- completed

jobs:
base:
runs-on: ubuntu-latest
steps:
-
name: Checkout
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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push BASE
uses: docker/build-push-action@v5
with:
context: .
file: ./dev/BASE
push: true
platforms: linux/amd64, linux/arm64, linux/s390x, linux/ppc64le, linux/arm
tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-instant-ai:base

build-v1:
needs:
- base
runs-on: ubuntu-latest
steps:
-
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/pre-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: pre-build

on:
workflow_dispatch:
schedule:
- cron: '0 6 */6 * *'
push:
branches:
- "main"
paths:
- "dev/BASE"

jobs:
base:
runs-on: ubuntu-latest
steps:
-
name: Checkout
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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push BASE
uses: docker/build-push-action@v5
with:
context: .
file: ./dev/BASE
push: true
platforms: linux/amd64, linux/arm64, linux/s390x, linux/ppc64le, linux/arm
tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-instant-ai:base
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ FROM monius/docker-instant-ai:base
COPY entrypoint.sh /run/entrypoint.sh
ENTRYPOINT ["/run/entrypoint.sh"]

EXPOSE map[80/tcp:{}]
EXPOSE 80 443

CMD ["nginx"]

0 comments on commit bebbe7d

Please sign in to comment.