Skip to content

Commit

Permalink
ci: add a workflow to generate release
Browse files Browse the repository at this point in the history
Signed-off-by: Phoeniix Zhao <[email protected]>
  • Loading branch information
Phoenix500526 committed Jan 22, 2024
1 parent 2da77bb commit 660a316
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: release

on:
push:
tags:
- "v*"

env:
IMAGE_ID: ghcr.io/xline-kv/xline-operator

jobs:
build:
name: Upload Release Asset
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
submodules: recursive
- name: Build xline operator image
run: |
make docker-build IMG=${{ env.IMAGE_ID }}:${{ github.ref }}
- name: Login to GHCR
if: startsWith(matrix.job.platform, 'linux/')
uses: docker/login-action@v2
with:
registry: ghcr.io
username: xline-kv
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push docker image to GHCR
run: |
make docker-push IMG=${{ env.IMAGE_ID }}:${{ github.ref }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

0 comments on commit 660a316

Please sign in to comment.