-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (65 loc) · 1.87 KB
/
build.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
67
68
69
name: build
on:
push:
branches:
- main
tags:
- "v*"
paths-ignore:
- "README.adoc"
permissions:
packages: write
contents: write
concurrency:
group: build
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: set datetime
run: |
echo "datetime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: log in registry.redhat.io
uses: redhat-actions/podman-login@v1
with:
registry: registry.redhat.io
username: ${{ secrets.REGISTRY_REDHAT_IO_USER }}
password: ${{ secrets.REGISTRY_REDHAT_IO_PASSWORD }}
- name: build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: inner-outer-guides
tags: latest ${{ github.ref_name }}
dockerfiles: |
./Dockerfile
build-args: |
CREATED_AT=${{ env.datetime }}
GITHUB_SHA=${{ github.sha }}
- name: push image to ghcr.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io/redhat-scholars
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
build-publish-site:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Run antora
uses: docker://antora/antora:3.1.2
with:
args: site-gh-pages.yml
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: "${{github.token}}"
FOLDER: gh-pages
BRANCH: gh-pages
COMMIT_MESSAGE: "[docs] Publishing the docs for commit(s) ${{github.sha}}"