Skip to content

Commit

Permalink
Added workflow for patch release (flyteorg#327)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuvraj <[email protected]>
  • Loading branch information
yindia committed Jan 23, 2022
1 parent 352943f commit 7d810c2
Showing 1 changed file with 33 additions and 27 deletions.
60 changes: 33 additions & 27 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Master

on:
workflow_dispatch:
push:
branches:
- master

jobs:
# Duplicated from pull request workflow because sharing is not yet supported
build-docker:
Expand Down Expand Up @@ -32,6 +32,31 @@ jobs:
- name: Tag and cache docker image
run: mkdir -p /tmp/tmp/docker-images && docker save flyteorg/${{ github.event.repository.name }}:builder -o /tmp/tmp/docker-images/snapshot-builder.tar && docker save flyteorg/${{ github.event.repository.name }}:latest -o /tmp/tmp/docker-images/snapshot.tar

tests-lint:
name: Run tests and lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unit Tests
uses: cedrickring/[email protected]
env:
GO111MODULE: "on"
with:
args: make install && make test_unit_codecov
- name: Push CodeCov
uses: codecov/codecov-action@v1
with:
file: coverage.txt
flags: unittests
fail_ci_if_error: true
- name: Lint
uses: cedrickring/[email protected]
env:
GO111MODULE: "on"
with:
args: make install && make lint

# Duplicated from pull request workflow because sharing is not yet supported
endtoend:
name: End to End tests
Expand Down Expand Up @@ -72,20 +97,24 @@ jobs:
name: Bump Version
if: github.actor != 'goreleaserbot'
runs-on: ubuntu-latest
needs: build-docker # Only to ensure it can successfully build
needs: [ endtoend, tests-lint ] # Only to ensure it can successfully build
outputs:
version: ${{ steps.bump-version.outputs.tag }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Set branch name
id: extract_branch
run: echo "::set-output name=branch_name::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})"
- name: Bump version and push tag
id: bump-version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
WITH_V: true
DEFAULT_BUMP: patch
RELEASE_BRANCHES: ${{ steps.extract_branch.outputs.branch_name }}

goreleaser:
name: Goreleaser
Expand Down Expand Up @@ -137,27 +166,4 @@ jobs:
dockerfile: Dockerfile.scheduler
registry: ghcr.io
build_extra_args: "--compress=true"
tests-lint:
name: Run tests and lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unit Tests
uses: cedrickring/[email protected]
env:
GO111MODULE: "on"
with:
args: make install && make test_unit_codecov
- name: Push CodeCov
uses: codecov/codecov-action@v1
with:
file: coverage.txt
flags: unittests
fail_ci_if_error: true
- name: Lint
uses: cedrickring/[email protected]
env:
GO111MODULE: "on"
with:
args: make install && make lint

0 comments on commit 7d810c2

Please sign in to comment.