generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from kyma-project/workflow-release
Workflow release
- Loading branch information
Showing
5 changed files
with
101 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Release Workflow | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: [ self-hosted ] | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: set version | ||
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT | ||
id: version | ||
|
||
- name: docker build | ||
run: VERSION=${{ steps.version.outputs.version }} make docker-build | ||
- name: docker-push | ||
run: VERSION=${{ steps.version.outputs.version }} make docker-push | ||
|
||
- name: prepare release artifacts | ||
run: VERSION=${{ steps.version.outputs.version }} make release | ||
- name: Github release | ||
uses: actions/create-release@v1 | ||
id: gh_release | ||
with: | ||
draft: false | ||
prerelease: false | ||
release_name: ${{ github.ref_name }} | ||
tag_name: ${{ github.ref_name }} | ||
body_path: RELEASE.md | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: upload cfapi crd | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.gh_release.outputs.upload_url }} | ||
asset_path: ./release-${{ steps.version.outputs.version }}/cfapi-crd.yaml | ||
asset_name: cfapi-crd.yaml | ||
asset_content_type: yaml | ||
- name: upload release default CR yaml | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.gh_release.outputs.upload_url }} | ||
asset_path: ./release-${{ steps.version.outputs.version }}/cfapi-default-cr.yaml | ||
asset_name: cfapi-default-cr.yaml | ||
asset_content_type: yaml | ||
- name: upload release controller yaml | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.gh_release.outputs.upload_url }} | ||
asset_path: ./release-${{ steps.version.outputs.version }}/cfapi-manager.yaml | ||
asset_name: cfapi-manager.yaml | ||
asset_content_type: yaml |
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
Binary file not shown.
Binary file not shown.
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