Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchuzhang committed Oct 8, 2022
1 parent 71bdc1b commit 9043a68
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release

on:
push:
tags:
- v*

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ secrets.DOCKER_TAG }}
22 changes: 1 addition & 21 deletions .github/workflows/ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: test

env:
NODE_OPTIONS: --max-old-space-size=6144
Expand Down Expand Up @@ -34,23 +34,3 @@ jobs:

- name: Test
run: pnpm run test

push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ secrets.DOCKER_TAG }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# blue-music-be [![CI status][github-action-image]][github-action-url]

[github-action-image]: https://github.com/liuchuzhang/blue-music-be/actions/workflows/ci.yml/badge.svg
[github-action-url]: https://github.com/liuchuzhang/blue-music-be/actions/workflows/ci.yml
[github-action-image]: https://github.com/liuchuzhang/blue-music-be/actions/workflows/test.yml/badge.svg
[github-action-url]: https://github.com/liuchuzhang/blue-music-be/actions/workflows/test.yml

## Usage

Expand Down

0 comments on commit 9043a68

Please sign in to comment.