Skip to content

Commit

Permalink
Add DEV GitHub aciton.
Browse files Browse the repository at this point in the history
Every image has two GitHub actions.
- PROD: Only runs after a user input with the image tag.
- DEV: Runs every time on a push from every branch. The image tag
is dev.
  • Loading branch information
thenerdlygentleman committed Oct 13, 2024
1 parent f010871 commit 444a213
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/mdbook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DockerHub mdbook
name: DockerHub mdbook PROD
on:
workflow_dispatch:
inputs:
Expand All @@ -8,7 +8,7 @@ on:
required: true
type: string
jobs:
docker:
Dockerhub mdbook PROD:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
Expand All @@ -24,6 +24,6 @@ jobs:
uses: docker/build-push-action@v6
with:
file: ./mdbook/Dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: thenerdlygentleman/mdbook:${{ github.event.inputs.tag }}
22 changes: 22 additions & 0 deletions .github/workflows/mdbook_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: DockerHub mdbook DEV
on: push
jobs:
Dockerhub mdbook DEV:
runs-on: ubuntu-latest
steps:
- 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.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./mdbook/Dockerfile
platforms: linux/amd64
push: true
tags: thenerdlygentleman/mdbook:dev
4 changes: 2 additions & 2 deletions .github/workflows/playground.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DockerHub playground
name: DockerHub playground PROD
on:
workflow_dispatch:
inputs:
Expand All @@ -8,7 +8,7 @@ on:
required: true
type: string
jobs:
docker:
DockerHub playground PROD:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/playground_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: DockerHub playground DEV
on: push
jobs:
DockerHub playground DEV:
runs-on: ubuntu-latest
steps:
- 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.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./playground/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: thenerdlygentleman/playground:dev
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ environments.

The Docker images are build via **Github** action. A collaborator has to start
the CI manually, by adding the desired tag name of the image.

## Images

|**Name** |**Version**|**Path** |
|------------|:---------:|--------------|
|*mdbook* |`0.1.0` |`./mdbook` |
|*playground*|`0.1.0` |`./playground`|

0 comments on commit 444a213

Please sign in to comment.