Skip to content

Commit

Permalink
Update workflow: push tagged docker builds (#161)
Browse files Browse the repository at this point in the history
* test new build workflow

* fix build workflow

* update docs
  • Loading branch information
nikmel2803 authored Apr 5, 2022
1 parent 5c67689 commit 0cc10ab
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/build-and-push.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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') }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 0cc10ab

Please sign in to comment.