-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor CICDs #2942
Merged
Merged
Refactor CICDs #2942
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
945d872
Create deploy-docs.yml
mitch1024 22b087b
Update deploy-docs.yml
mitch1024 ac7720a
Update deploy-docs.yml
mitch1024 dbe14e4
Update deploy-docs.yml
mitch1024 707ca7d
Update deploy-docs.yml
mitch1024 7f96448
Update deploy-docs.yml
mitch1024 42a703b
Update deploy-docs.yml
mitch1024 2b9da50
Update deploy-docs.yml
mitch1024 d678487
Update deploy-docs.yml
mitch1024 6e952bf
Update deploy-docs.yml
mitch1024 df84248
Update deploy-docs.yml
mitch1024 a7ae36a
Update deploy-docs.yml
mitch1024 e2e5185
Update deploy-docs.yml
mitch1024 1eddb95
Update deploy-docs.yml
mitch1024 f6068d5
Update deploy-docs.yml
mitch1024 e1ccb67
Update deploy-docs.yml
mitch1024 85831fc
Update deploy-docs.yml
mitch1024 ee5eee2
Update deploy-docs.yml
mitch1024 462b5f4
Update deploy-docs.yml
mitch1024 ec074c5
Update deploy-docs.yml
mitch1024 247d052
Update Dockerfile
mitch1024 50548de
Update deploy-docs.yml
mitch1024 f707fa9
add deps
mitch-z 0b9be15
Update deploy-docs.yml
mitch1024 ef2b361
Update deploy-docs.yml
mitch1024 e673938
Update deploy-docs.yml
mitch1024 d56e325
Update deploy-docs.yml
mitch1024 a5e14bc
Update deploy-docs.yml
mitch1024 59c3709
Update deploy-docs.yml
mitch1024 49232a8
Update deploy-docs.yml
mitch1024 674e5ad
Update Dockerfile
mitch1024 d16850c
Update Dockerfile
mitch1024 988f90f
Update and rename BuildAndPublish.yml to publish-docker-image.yml
mitch1024 883b172
Update and rename TestUnit.yml to run-unit-tests.yml
mitch1024 4e5e518
Update releases.yml
mitch1024 a3a07c7
Rename release-binary.yml to releases.yml
mitch1024 eb7179d
Update deploy-docs.yml
mitch1024 2dff75e
Update deploy-docs.yml
mitch1024 4919fa7
Update README.md
mitch1024 cb88e2e
add release notes
mitch-z e391c1f
Update releases.yml
mitch1024 05d8b55
remove windows binary support
mitch-z 722cf2b
remove windows binary support
mitch-z cf4f59a
replace github.ref to GITHUB_REF_NAME
mitch-z 0b65ce7
remove zip binaries step
mitch-z 8f25fe1
remove test contents
mitch-z 1f35ea1
Merge branch 'develop'
mitch-z 2edc046
remove package-lock.json
mitch-z cc2bda5
upgrade actions
mitch-z e054531
upgrade actions
mitch-z File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,73 @@ | ||
name: Build and Deploy Docs | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths: [ "docs/**" ] | ||
|
||
jobs: | ||
setup-build-publish: | ||
name: Setup, Build and Publish | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: 'docs/' | ||
sparse-checkout-cone-mode: false | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: ./docs/Dockerfile | ||
push: true | ||
tags: irisnet/docs:${{ github.sha }} | ||
|
||
deploy: | ||
name: Deploy | ||
runs-on: arc-runner-set | ||
environment: production | ||
|
||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
|
||
steps: | ||
- name: 'Set up Google Cloud SDK' | ||
uses: 'google-github-actions/setup-gcloud@v2' | ||
with: | ||
version: '>= 363.0.0' | ||
install_components: "gke-gcloud-auth-plugin" | ||
|
||
- name: Set up Kubectl | ||
uses: azure/setup-kubectl@v3 | ||
with: | ||
version: 'v1.21.0' | ||
|
||
- name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
project_id: ${{ secrets.GKE_PROJECT }} | ||
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENDITY_PROVIDER }} | ||
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} | ||
token_format: 'access_token' | ||
|
||
- name: Set up GKE credentials | ||
uses: google-github-actions/get-gke-credentials@v2 | ||
with: | ||
cluster_name: ${{ secrets.GKE_CLUSTER }} | ||
location: ${{ secrets.GKE_REGION }} | ||
|
||
- name: Deploy to GKE | ||
run: | | ||
gcloud container clusters get-credentials app --region ${{ secrets.GKE_REGION }} --project ${{ secrets.GKE_PROJECT }} | ||
kubectl set image -n irisnet deployment/irisnet-docs frontend=irisnet/docs:${{ github.sha }} | ||
kubectl rollout status -n irisnet deployment/irisnet-docs |
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,30 @@ | ||
name: Build and Publish Docker Image | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5 | ||
|
||
jobs: | ||
setup-build-publish: | ||
name: Setup, Build and Publish | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: irisnet/irishub:${{ github.ref == 'refs/tags/*' && github.ref || github.sha }} |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
setup-build-publish: | ||
name: Setup, Build and Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Codes | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Golang | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '^1.21.0' # The Go version to download (if necessary) and use. | ||
|
||
- name: Build Binaries | ||
run: | | ||
sudo apt-get install -y gcc-aarch64-linux-gnu | ||
make build-all-binaries | ||
|
||
- name: Publish Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: RELEASE.md | ||
files: | | ||
build/iris-linux-amd64 | ||
build/iris-linux-arm64 |
11 changes: 5 additions & 6 deletions
11
.github/workflows/TestUnit.yml → .github/workflows/run-unit-tests.yml
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
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
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
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 @@ | ||
TODO | ||
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
FROM node:alpine AS builder | ||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
COPY docs/package.json docs/yarn.lock ./ | ||
RUN yarn install | ||
COPY . . | ||
COPY docs/ . | ||
RUN yarn run build | ||
|
||
FROM nginx:alpine | ||
RUN rm -rf /usr/share/nginx/html/* | ||
COPY --from=builder /app/.vuepress/dist /usr/share/nginx/html/docs | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
CMD ["nginx", "-g", "daemon off;"] |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify the content for release notes or detail the TODO.
Would you like assistance in drafting the initial release notes? If so, please provide some bullet points or features to include.