Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Github Actions for UI #225

Merged
merged 4 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# 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: Build UI

on:
push:
branches: [ main ]
paths:
- 'ui/**'
pull_request:
branches: [ opened, synchronize, reopened ]
paths:
- 'ui/**'

jobs:
build:
buildui:

runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ui

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ jobs:
env:
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: ui/package.json

- run: yarn install --frozen-lockfile
working-directory: ./ui

- run: npm run build --if-present
working-directory: ./ui
env:
CI: false

- name: docker build ui
working-directory: ./ui
run: |
docker build -t terrakube-ui:latest .

- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
Expand Down Expand Up @@ -69,4 +90,16 @@ jobs:
run: docker push azbuilder/executor:$VERSION

- name: Docker Push EXECUTOR latest
run: docker push azbuilder/executor:latest
run: docker push azbuilder/executor:latest

- name: Docker tag UI Image
run: docker tag $(docker images terrakube-ui -q) azbuilder/terrakube-ui:$VERSION

- name: Docker tag UI Image latest
run: docker tag $(docker images terrakube-ui -q) azbuilder/terrakube-ui:latest

- name: Docker Push UI Version
run: docker push azbuilder/terrakube-ui:$VERSION

- name: Docker Push UI Latest
run: docker push azbuilder/terrakube-ui:latest
56 changes: 0 additions & 56 deletions ui/.github/workflows/release.yml

This file was deleted.