Skip to content

Commit

Permalink
Merge pull request #771 from anoop2811/master
Browse files Browse the repository at this point in the history
Chore: dependency and workflow updates
  • Loading branch information
FogDong authored Feb 15, 2025
2 parents 313f984 + 9d87381 commit 6f3fcd7
Show file tree
Hide file tree
Showing 6 changed files with 1,741 additions and 233 deletions.
65 changes: 43 additions & 22 deletions .github/workflows/addon-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ name: Addon-test

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

env:
# Common versions
GO_VERSION: '1.19'

GO_VERSION: "1.22"

jobs:

detect-noop:
runs-on: ubuntu-latest
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
Expand All @@ -29,23 +27,47 @@ jobs:

Addon-test:
name: Addon-test
runs-on: self-hosted
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
uses: actions/checkout@v4

- name: Install tools
run: |
sudo apt-get update
sudo apt-get install make gcc jq ca-certificates curl gnupg -y
sudo snap install kubectl --classic
sudo snap install helm --classic
sudo apt-get install -y make gcc jq ca-certificates curl gnupg
# Detect OS and ARCH
OS=$(uname | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
if [[ "$ARCH" == "x86_64" ]]; then
ARCH="amd64"
elif [[ "$ARCH" == "aarch64" ]]; then
ARCH="arm64"
fi
echo "Detected OS: $OS"
echo "Detected ARCH: $ARCH"
# Install kubectl dynamically
KUBECTL_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/${OS}/${ARCH}/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
# Install Helm dynamically
HELM_VERSION=$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r .tag_name)
curl -LO "https://get.helm.sh/helm-${HELM_VERSION}-${OS}-${ARCH}.tar.gz"
tar -zxvf helm-${HELM_VERSION}-${OS}-${ARCH}.tar.gz
sudo mv ${OS}-${ARCH}/helm /usr/local/bin/helm
rm -rf ${OS}-${ARCH} helm-${HELM_VERSION}-${OS}-${ARCH}.tar.gz
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

Expand All @@ -55,20 +77,20 @@ jobs:
- name: Setup KinD
run: |
go install sigs.k8s.io/kind@v0.19.0
go install sigs.k8s.io/kind@v0.22.0
kind delete cluster --name worker || true
kind create cluster --name worker --image=kindest/node:v1.26.4
kind create cluster --name worker --image=kindest/node:v1.29.12
kind export kubeconfig --internal --name worker --kubeconfig /tmp/worker.kubeconfig
kind delete cluster || true
kind create cluster --image=kindest/node:v1.26.4
kind create cluster --image=kindest/node:v1.29.12
- name: Install vela cli
run: |
curl -fsSl https://kubevela.io/script/install.sh | bash -s v1.9.0-alpha.3
curl -fsSl https://kubevela.io/script/install.sh | bash -s v1.10.1
- name: Install vela core
run: |
vela install -v v1.9.0-alpha.2 --yes
vela install -v v1.10.1 --yes
kubectl get deploy -n vela-system kubevela-vela-core -oyaml
- name: Vela worker cluster join
Expand All @@ -78,16 +100,15 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37.0.1
uses: tj-actions/changed-files@v45.0.7

- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
- name: Addon e2e-test
run: |
go build -o main test/e2e-test/addon-test/main.go
./main ${{ steps.changed-files.outputs.all_changed_files }}
12 changes: 6 additions & 6 deletions .github/workflows/addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
env:
URL: https://kubevela.github.io/catalog
GO_VERSION: 1.19
GO_VERSION: 1.22
runs-on: ubuntu-22.04
steps:
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: package-addon-gen-index
run: |
Expand All @@ -47,11 +47,11 @@ jobs:
mv ./*.tgz ../../docs/experimental/
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: docs/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/issue-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:
bot:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: "oam-dev/kubevela-github-actions"
path: ./actions
Expand Down
Loading

0 comments on commit 6f3fcd7

Please sign in to comment.