-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(docker): add docker tags for prod releases (#14)
- Loading branch information
Showing
2 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright (c) 2019 Target Brands, Inc. All rights reserved. | ||
# | ||
# Use of this source code is governed by the LICENSE file in this repository. | ||
|
||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
release: | ||
name: release tagged image | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_ENV: production | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-modules- | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.USE_NODE_VER }} | ||
|
||
# ┌┐ ┬ ┬┬┬ ┌┬┐ | ||
# ├┴┐│ │││ ││ | ||
# └─┘└─┘┴┴─┘─┴┘ | ||
- name: install dependencies | ||
run: npm i --prefer-offline --no-audit | ||
- name: run production build | ||
run: npm run build-prod | ||
|
||
# ┌┬┐┌─┐┌─┐┬┌─┌─┐┬─┐ | ||
# │││ ││ ├┴┐├┤ ├┬┘ | ||
# ─┴┘└─┘└─┘┴ ┴└─┘┴└─ | ||
- name: push to docker | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: target/vela-ui | ||
cache: true | ||
tag_names: true | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} |