-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated setup-ko action in release workflow
- Loading branch information
Showing
1 changed file
with
33 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,11 @@ on: | |
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
|
||
cli: | ||
name: Release the CLI | ||
runs-on: ubuntu-latest | ||
|
@@ -16,7 +15,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
|
@@ -36,38 +35,38 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go 1.18.x | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
- name: Set up Go 1.18.x | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
|
||
# will install latest ko version and default login/configure | ||
# KO_DOCKER_REPO to ghcr.io | ||
- name: Setup ko for ghcr.io | ||
uses: imjasonh/[email protected] | ||
|
||
# will install latest ko version and default login/configure | ||
# KO_DOCKER_REPO to ghcr.io | ||
- name: Setup ko for ghcr.io | ||
uses: imjasonh/[email protected] | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Get Release URL | ||
id: get_release_url | ||
uses: bruceadams/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Get Release URL | ||
id: get_release_url | ||
uses: bruceadams/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Build and Publish images, Produce release artifact. | ||
run: | | ||
ko resolve --platform=all --tags $(basename "${{ github.ref }}" ) -BRf config/ > release.yaml | ||
- name: Build and Publish images, Produce release artifact. | ||
run: | | ||
ko resolve --platform=all --tags $(basename "${{ github.ref }}" ) -BRf config/ > release.yaml | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release_url.outputs.upload_url }} | ||
asset_path: ./release.yaml | ||
asset_name: release.yaml | ||
asset_content_type: text/plain | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release_url.outputs.upload_url }} | ||
asset_path: ./release.yaml | ||
asset_name: release.yaml | ||
asset_content_type: text/plain |