🤖 Add release workflow

This commit is contained in:
SebClem 2022-07-04 11:51:13 +02:00 committed by Sébastien Clément
parent ee8a82209f
commit 12f512e05b
2 changed files with 41 additions and 25 deletions

41
.github/workflows/docker_release.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Build Dev Docker
on:
push:
tags:
- "**"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
- name: 🛠️ Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: 🔒 Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🛠️ Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.4
- name: 🛠️ Set tag
run: |
echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
- name: 🔨 Build and push Docker
uses: docker/build-push-action@v3
with:
push: true
context: .
tags: |
ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }}
ghcr.io/sebclem/claptrapbot-ui:latest
file: ./Dockerfile

View File

@ -1,25 +0,0 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
- name: ⚒️ Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "yarn"
- name: 🔨 Install dependencies
run: yarn install --immutable
- name: 🔨 Build app
run: yarn build --mode staging