Skip to content

Commit

Permalink
chore(repo): cleanup workflow and action names and refactors (#12998)
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx authored Jan 21, 2023
1 parent 07debb7 commit 609e96f
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 146 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Set Up Protocol'
description: 'Set up protocol dependencies'
name: "Install pnpm dependencies"
description: "Install pnpm dependencies"

runs:
using: "composite"
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Bridge UI

on:
push:
branches: [main]
paths:
- "packages/bridge-ui/**"
pull_request:
paths:
- "packages/bridge-ui/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Bridge UI - Unit Tests
working-directory: ./packages/bridge-ui
run: pnpm test

- name: Bridge UI - Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./packages/bridge-ui/coverage
flags: bridge-ui
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: "Lint PR"
name: Lint PR

on:
pull_request:
types: [opened, edited, synchronize, reopened]
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
Expand All @@ -14,6 +17,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
scopes: |
repo
branding
bridge-ui
protocol
Expand Down
File renamed without changes.
49 changes: 0 additions & 49 deletions .github/workflows/docker.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Solidity
name: Protocol

on:
push:
Expand All @@ -21,8 +21,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up protocol
uses: ./.github/actions/set-up-protocol
- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: protocol - Unit Tests
working-directory: ./packages/protocol
Expand Down
48 changes: 46 additions & 2 deletions .github/workflows/golang.yml → .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Golang
name: Relayer

on:
push:
Expand Down Expand Up @@ -50,4 +50,48 @@ jobs:
uses: codecov/codecov-action@v3
with:
files: ./packages/relayer/coverage.txt
flags: relayer
flags: relayer

push-docker-image:
# only push docker image on PR merge to main
if: ${{ github.event }} == 'push'
name: Build and push docker image
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to GCR
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gcr.io/evmchain/relayer
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha
- name: Build and push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64
push: true
context: packages/relayer
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
55 changes: 0 additions & 55 deletions .github/workflows/typescript.yml

This file was deleted.

31 changes: 4 additions & 27 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,11 @@ jobs:
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.15"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Packages
run: pnpm -F website install
- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Build Website
run: pnpm -F website build
9 changes: 4 additions & 5 deletions .github/workflows/whitepaper.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Whitepaper

on:
push:
branches: [main]
Expand All @@ -16,10 +17,8 @@ jobs:
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.15"
- name: Checkout repository
uses: actions/checkout@v3

- name: Compile main.tex
uses: xu-cheng/latex-action@v2
Expand All @@ -30,7 +29,7 @@ jobs:

- name: Rename
working-directory: ./packages/whitepaper
run: rm -rf build/ && mkdir build && mv main.pdf build/taiko-whitepaper.pdf
run: rm -rf build/ && mkdir build && mv main.pdf build/taiko-whitepaper.pdf

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
Expand Down

0 comments on commit 609e96f

Please sign in to comment.