Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Added reuseable workflows (#34)
Browse files Browse the repository at this point in the history
* Added reuseable workflows

Signed-off-by: Yuvraj <code@evalsocket.dev>

* more changes

Signed-off-by: Yuvraj <code@evalsocket.dev>
  • Loading branch information
yindia authored Feb 17, 2022
1 parent bcc6db3 commit b1ba2f7
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 282 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/boilerplate-automation.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Flyte copilot Checks

on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
lint:
name: Lint
uses: flyteorg/flytetools/.github/workflows/lint.yml@master

tests:
name: Unit Tests
uses: flyteorg/flytetools/.github/workflows/tests.yml@master
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}

dry_run:
name: Dry run goreleaser
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Run GoReleaser dry run
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: --snapshot --skip-publish --rm-dist

build_docker_image:
name: Build & Push Flyte copilot Image
uses: flyteorg/flytetools/.github/workflows/publish.yml@master
with:
version: v1
dockerfile: Dockerfile
push: false
repository: ${{ github.repository }}
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }}

generate:
name: Check Go Gennerate
uses: flyteorg/flytetools/.github/workflows/go_generate.yml@master

bump_version:
name: Bump Version
if: ${{ github.event_name != 'pull_request' }}
needs: [ lint, tests, generate, dry_run, build_docker_image ] # Only to ensure it can successfully build
uses: flyteorg/flytetools/.github/workflows/bump_version.yml@master
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}

goreleaser:
name: Goreleaser
needs: [ bump_version ] # Only to ensure it can successfully build
uses: flyteorg/flytetools/.github/workflows/goreleaser.yml@master
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}

push_docker_image:
name: Build & Push Flyte copilot Image
needs: [ bump_version ]
uses: flyteorg/flytetools/.github/workflows/publish.yml@master
with:
version: ${{ needs.bump_version.outputs.version }}
dockerfile: Dockerfile
push: true
repository: ${{ github.repository }}
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }}
97 changes: 0 additions & 97 deletions .github/workflows/master.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/pull_request.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/release-automation.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/release.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/upgrade_automtion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Upgrade Automation
on:
workflow_dispatch:
inputs:
component:
description: "Name of Flyte component"
required: true
default: "boilerplate"
type: choice
options:
- boilerplate
- flyteidl
jobs:
trigger-upgrade:
name: ${{ github.event.inputs.component }} Upgrade
uses: flyteorg/flytetools/.github/workflows/flyte_automation.yml@master
with:
component: ${{ github.event.inputs.component }}
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}

0 comments on commit b1ba2f7

Please sign in to comment.