mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-18 20:59:42 +02:00
Update workflow: push tagged docker builds (#161)
* test new build workflow * fix build workflow * update docs
This commit is contained in:
parent
5c6768922a
commit
0cc10ab713
3 changed files with 50 additions and 23 deletions
23
.github/workflows/build-and-push.yml
vendored
23
.github/workflows/build-and-push.yml
vendored
|
@ -1,23 +0,0 @@
|
|||
name: Build and deploy
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
DOCKER_REPO: ${{ secrets.DOCKER_USERNAME }}/codex-docs
|
||||
|
||||
jobs:
|
||||
build_and_deploy:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: ${{ env.DOCKER_REPO }}
|
||||
tag_with_ref: true
|
||||
dockerfile: docker/Dockerfile.prod
|
||||
push: ${{ endsWith(github.ref, '/stage') || endsWith(github.ref, '/prod') }}
|
42
.github/workflows/build.yml
vendored
Normal file
42
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: Build and push Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: docker/Dockerfile.prod
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
push: ${{ startsWith(github.ref, 'refs/tags/v') || endsWith(github.ref, '/stage') }}
|
|
@ -62,6 +62,14 @@ To manage pages you need to authorize (available on `/auth`).
|
|||
|
||||
To generate password use `yarn generatePassword [password]` command.
|
||||
|
||||
## Release process
|
||||
|
||||
We use [release-drafter](https://github.com/release-drafter/release-drafter) to generate release notes and GitHub release.
|
||||
It will automatically generate draft release based pull requests data between current version and previous version.
|
||||
To make new release you need go to [releases](https://github.com/codex-team/codex.docs/releases) page find the latest draft release and mark it as ready.
|
||||
After creating new release, new git tag will be created and new version will be published.
|
||||
|
||||
|
||||
# About CodeX
|
||||
|
||||
<img align="right" width="120" height="120" src="https://codex.so/public/app/img/codex-logo.svg" hspace="50">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue