mirror of
https://github.com/rancher/k3k.git
synced 2026-02-14 18:10:01 +00:00
Move to Github Action (#105)
* Move to Github Action Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Move to Github Action Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * fix code generation * Add release and chart workflows Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Add release and chart workflows Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Add release and chart workflows Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Add release and chart workflows Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * test release and charts Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * test release and charts Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * test release and charts Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * test release and charts Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * test release and charts Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Fix GHA migration Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Fix GHA migration Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> --------- Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
This commit is contained in:
22
.github/workflows/build.yml
vendored
Normal file
22
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
name: Build
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
build-cross-arch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cross Arch Build
|
||||
run: |
|
||||
make ci
|
||||
env:
|
||||
CROSS: "true"
|
||||
|
||||
30
.github/workflows/chart.yml
vendored
Normal file
30
.github/workflows/chart.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "chart-*"
|
||||
|
||||
name: Chart
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
jobs:
|
||||
chart-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Package Chart
|
||||
run: |
|
||||
make package-chart;
|
||||
|
||||
- name: Release Chart
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
deploy/*
|
||||
|
||||
- name: Index Chart
|
||||
run: |
|
||||
make index-chart
|
||||
|
||||
52
.github/workflows/release.yml
vendored
Normal file
52
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
name: Release
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
jobs:
|
||||
release-cross-arch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cross Arch Build
|
||||
run: |
|
||||
make ci
|
||||
env:
|
||||
CROSS: "true"
|
||||
|
||||
- name: "Read secrets"
|
||||
uses: rancher-eio/read-vault-secrets@main
|
||||
with:
|
||||
secrets: |
|
||||
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials username | DOCKER_USERNAME ;
|
||||
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials password | DOCKER_PASSWORD ;
|
||||
|
||||
- name: release binaries
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
bin/*
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ env.DOCKER_USERNAME }}
|
||||
password: ${{ env.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build container image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: rancher/k3k:${{ github.ref_name }}
|
||||
file: package/Dockerfile
|
||||
platforms: linux/amd64
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user