-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (66 loc) · 2.21 KB
/
Copy pathdocker.yml
File metadata and controls
79 lines (66 loc) · 2.21 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build and push docker image
on:
push:
branches:
- "master"
workflow_dispatch: {}
schedule:
- cron: "0 21 * * 6"
jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
disable-sudo: true
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: "errbit/errbit"
path: "errbit"
fetch-tags: true
- name: Set up Ruby
uses: ruby/setup-ruby@a0102e0972be65f351c307e2d64b9314a57c8073 # v1.324.0
with:
rubygems: "latest"
bundler: "latest"
bundler-cache: true
- name: Build docs
env:
ERRBIT_PATH: "errbit"
run: |
bundle exec jekyll build --verbose
pushd blog
bundle install
bundle exec jekyll build --destination ../_site/blog
popd
- name: Docker meta
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: biow0lf/errbit-docs
- name: Login to Docker Hub
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Build and push
id: docker_build
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
pull: true
push: true
no-cache: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: COMMIT=${{ github.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}