Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <pingsutw@apache.org>
  • Loading branch information
pingsutw committed Apr 20, 2023
1 parent 2c06258 commit 2371f60
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 5 deletions.
51 changes: 47 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Unit Tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
run: make install && make test_unit_codecov
- name: Push CodeCov
uses: codecov/codecov-action@v3.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
with:
file: coverage.txt
flags: unittests
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
id: bump_version
uses: anothrNick/github-tag-action@1.36.0
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 }}
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
args: release --rm-dist
workdir: ${{ matrix.package }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}

bump_component_version:
needs: [ changes, bump_version, goreleaser ]
Expand All @@ -324,6 +324,49 @@ jobs:
run: |
git tag ${{ matrix.package }}/${{ needs.bump_version.outputs.version }}
git push origin ${{ matrix.package }}/${{ needs.bump_version.outputs.version }}
push-github:
needs: [ changes, bump_version ]
name: Push to Github Registry
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
defaults:
run:
working-directory: ${{ matrix.package }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
- name: Prepare Image Tags
id: tags
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ matrix.package }}
tags: |
type=raw,value=latest
type=raw,value=${{ matrix.package }}
type=sha,format=long,prefix=
- name: Build and Push Image
uses: docker/build-push-action@v3
with:
context: .
file: ${{ matrix.package }}
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ steps.tags.outputs.tags }}

# TODO: Add push_docker_image, push-docker-image-flytescheduler
# https://github.com/flyteorg/flyteadmin/blob/master/.github/workflows/checks.yml#L74
Expand Down
2 changes: 1 addition & 1 deletion flytectl/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ builds:
ldflags:
- -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}}
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- name_template: 'flytectl_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Darwin
linux: Linux
Expand Down
1 change: 1 addition & 0 deletions flytestdlib/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ builds:
ldflags:
- -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}}
archives:
- name_template: 'flytestdlib_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- replacements:
darwin: macOS
linux: Linux
Expand Down

0 comments on commit 2371f60

Please sign in to comment.