Skip to content

Commit

Permalink
ci: add event triggers (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikjagrut authored Sep 20, 2023
1 parent ee428e4 commit 0eb3467
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# - name: Run chart-testing (install)
# if: steps.list-changed.outputs.changed == 'true'
# run: ct install --target-branch ${{ github.event.repository.default_branch }}

charts-test:
runs-on: ubuntu-latest
# needs: lint-helm-chart-test
Expand All @@ -67,21 +67,21 @@ jobs:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
with:
submodules: 'recursive'
submodules: "recursive"

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #4.1.0
with:
go-version: "1.21"
cache: false

- name: Install helm
uses: Azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 #v3.5

- name: Kind Cluster
uses: dda0770415bac9fc20092cacbc54aa298604d140 #v1.8.0
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 #v1.8.0
with:
config: 'dev/cluster-config.yaml'
config: "dev/cluster-config.yaml"
cluster_name: tarian-helm-chart-testing

- name: Testing Kind cluster setup
Expand All @@ -92,13 +92,13 @@ jobs:
kubectl get pods -n kube-system
echo "kubectl config current-context:" $(kubectl config current-context)
echo "KUBECONFIG env var:" ${KUBECONFIG}
- name: Create Kind registry
run: |
set -x
# Create a Kind registry
./dev/run-kind-registry.sh
- name: Build Tarian
run: |
set -x
Expand All @@ -111,9 +111,9 @@ jobs:
./bin/goreleaser release --snapshot --rm-dist
make push-local-images
cp dist/tarianctl_linux_amd64/tarianctl ./bin/
- name: Create namespace
run: |
run: |
set -x
kubectl create namespace tarian-system
Expand All @@ -137,7 +137,7 @@ jobs:
--set server.image.tag=latest \
--set server.service.type=NodePort \
--set server.service.nodePort=31051
- name: Install Tarian cluster agent
run: |
set -x
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
kubectl logs -n tarian-system daemonsets/tarian-node-agent
echo "======================================================================================================================"
exit 1
# SKIP: Add this part into release workflow

# release:
Expand Down Expand Up @@ -219,4 +219,4 @@ jobs:
# with:
# config: .cr.yaml
# env:
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17 changes: 10 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ on:
release:
types: [created]
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited]
branches:
- main
paths:
- "charts/**"
- ".github/workflows/ci.yaml"
- "**.go"

permissions: read-all
Expand All @@ -23,14 +26,14 @@ jobs:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
with:
submodules: 'recursive'
submodules: "recursive"

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #4.1.0
with:
go-version: "1.21"
cache: false

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -45,7 +48,7 @@ jobs:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
with:
submodules: 'recursive'
submodules: "recursive"

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #4.1.0
Expand All @@ -68,11 +71,11 @@ jobs:
set -x
# Create a Kind registry
./dev/run-kind-registry.sh
- name: Kind Cluster
uses: dda0770415bac9fc20092cacbc54aa298604d140 #v1.8.0
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 #v1.8.0
with:
config: 'dev/cluster-config.yaml'
config: "dev/cluster-config.yaml"
cluster_name: tarian-testing

- name: Testing Kind cluster setup
Expand Down Expand Up @@ -145,7 +148,7 @@ jobs:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
with:
submodules: 'recursive'
submodules: "recursive"

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #4.1.0
Expand Down

0 comments on commit 0eb3467

Please sign in to comment.