-
Notifications
You must be signed in to change notification settings - Fork 36
37 lines (30 loc) · 1.04 KB
/
push-workflow-serve.yaml
File metadata and controls
37 lines (30 loc) · 1.04 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
name: Build docs server
env:
PUSH_TARGET_IMG: ghcr.io/kingdonb/sites/workflow # assumed to be on GHCR, ambient credentials are used
PUSH_TARGET_TAG: serve # Configure what tag will push
on:
push:
paths: [ Dockerfile, _scripts/flux-pull.sh ]
branches: [ main ] # Configure the branchs which you want to run this workflow
jobs:
build-push:
name: "Build & Push docs server"
runs-on: ubuntu-latest
steps:
# Checkout source code
- name: Checkout
uses: actions/checkout@v3
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Make server with latest published artifact
# FIXME: this will always/occasionally pick up the "last" image published
# so you may need to push twice to publish a change, unless this is fixed
- name: Docker build and push
run: |
SITE=${PUSH_TARGET_IMG}:${PUSH_TARGET_TAG}
docker build -t ${SITE} .
docker push ${SITE}