-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.8 KB
/
build-n-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build and Push Docker Image
on:
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
env:
BASE_IMAGE_NAME: kjuly/mkdocs
MATERIAL_IMAGE_NAME: kjuly/mkdocs-material
MATERIAL_IMAGE_DOCKERFILE: Dockerfile-material
permissions:
contents: read
packages: write
id-token: write
attestations: write
concurrency:
group: "images"
cancel-in-progress: false
jobs:
build-n-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# mkdocs
- name: Build and Push Image to Docker Hub - mkdocs
uses: kjuly/docker-image-publisher@main
with:
image_name: ${{ env.BASE_IMAGE_NAME }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
token: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Image to Github Container Registry - mkdocs
uses: kjuly/docker-image-publisher@main
with:
registry: ghcr.io
image_name: ${{ env.BASE_IMAGE_NAME }}
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
# mkdocs + theme:material
- name: Build and Push Image to Docker Hub - mkdocs+material
uses: kjuly/docker-image-publisher@main
with:
image_name: ${{ env.MATERIAL_IMAGE_NAME }}
dockerfile: ${{ env.MATERIAL_IMAGE_DOCKERFILE }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
token: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Image to Github Container Registry - mkdocs+material
uses: kjuly/docker-image-publisher@main
with:
registry: ghcr.io
image_name: ${{ env.MATERIAL_IMAGE_NAME }}
dockerfile: ${{ env.MATERIAL_IMAGE_DOCKERFILE }}
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}