-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
156 additions
and
47 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -16,6 +16,11 @@ jobs: | |
build-openresty: | ||
name: Build Openresty | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git | ||
|
@@ -24,19 +29,26 @@ jobs: | |
git config user.email "[email protected]" | ||
- uses: docker/setup-buildx-action@v3 | ||
- name: build | ||
env: | ||
MATRIX_PLATFORM: "${{ matrix.platform }}" | ||
run: | | ||
./scripts/run-like-github-actions.sh build-nginx | ||
platform=$(echo "$MATRIX_PLATFORM" | sed 's|/|-|g') | ||
echo "artifactPath=./alb-nginx-base-$platform.tar" >> $GITHUB_ENV | ||
echo "artifactName=alb-nginx-base-$platform" >> $GITHUB_ENV | ||
- name: Upload alb-nginx-base images to artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: alb-nginx-base | ||
path: alb-nginx-base.tar | ||
name: ${{ env.artifactName }} | ||
path: ${{ env.artifactPath }} | ||
- name: release | ||
if: ${{ inputs.do_release }} | ||
env: | ||
RELEASE_ME: "${{ github.event.inputs.do_release == 'true' }}" | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
run: | | ||
env | ||
./scripts/run-like-github-actions.sh release-nginx |
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 |
---|---|---|
|
@@ -34,6 +34,11 @@ jobs: | |
build-alb: | ||
name: Build alb | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git | ||
|
@@ -47,16 +52,18 @@ jobs: | |
version-file: ./deploy/chart/alb/Chart.yaml | ||
version-file-extraction-pattern: 'version: v([0-9]*\.[0-9]*\.[0-9]*)' | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: azure/setup-helm@v3 | ||
with: | ||
version: '${{ env.HELM_VERSION }}' | ||
- name: test alb go | ||
if: ${{ matrix.platform == 'linux/amd64' }} | ||
env: | ||
MATRIX_PLATFORM: "${{ matrix.platform }}" | ||
run: | | ||
set -x | ||
echo "FROM --platform=\${{ matrix.platform }} | $MATRIX_PLATFORM " | ||
./scripts/run-like-github-actions.sh test-alb-go | ||
- name: build | ||
env: | ||
RELEASE_ME: "${{ github.event.inputs.do_release == 'true' }}" | ||
MATRIX_PLATFORM: "${{matrix.platform }}" | ||
run: | | ||
set -x | ||
./scripts/run-like-github-actions.sh build-alb | ||
|
@@ -65,26 +72,54 @@ jobs: | |
with: | ||
name: alb | ||
path: alb.tar | ||
- name: Upload chart's to artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: alb-chart | ||
path: alauda-alb2.tgz | ||
- name: test alb nginx | ||
env: | ||
MATRIX_PLATFORM: "${{matrix.platform }}" | ||
run: | | ||
set -x | ||
./scripts/run-like-github-actions.sh test-alb-nginx | ||
release-alb: | ||
name: Release alb | ||
runs-on: ubuntu-22.04 | ||
needs: [build-alb] | ||
steps: | ||
- name: cr | ||
uses: helm/[email protected] | ||
with: | ||
install_only: true | ||
- uses: azure/setup-helm@v3 | ||
with: | ||
version: '${{ env.HELM_VERSION }}' | ||
- name: Upload chart's to artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: alb-chart | ||
path: alauda-alb2.tgz | ||
- name: pre-release | ||
env: | ||
RELEASE_ME: "${{ github.event.inputs.do_release == 'true' }}" | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
run: | | ||
branch=$(echo "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's|/|-|g') | ||
echo "pre-release check: $branch $RELEASE_ME" | ||
if [[ "$RELEASE_ME" == "false" ]] && [[ "$branch" == "master" ]] ;then | ||
./scripts/run-like-github-actions.sh pre-release-alb | ||
exit | ||
fi | ||
echo "not pre release" | ||
- name: release | ||
if: ${{ inputs.do_release }} | ||
env: | ||
RELEASE_ME: "${{ github.event.inputs.do_release == 'true' }}" | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
run: | | ||
./scripts/run-like-github-actions.sh release-alb | ||
if [[ "$RELEASE_ME" == "true" ]];then | ||
./scripts/run-like-github-actions.sh release-alb | ||
exit | ||
fi | ||
echo "not release" |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
pwd | ||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories | ||
apk add bash | ||
apk add bash curl jq | ||
bash -c 'ALB=$PWD;source ./scripts/alb-dev-actions.sh;alb-test-all-in-ci-golang' |
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,5 +1,5 @@ | ||
#!/bin/sh | ||
pwd | ||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories | ||
apk add bash | ||
apk add bash curl jq | ||
bash -c 'ALB=$PWD;source ./template/actions/alb-nginx.sh;alb-test-all-in-ci-nginx' |
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,2 @@ | ||
FROM alpine:latest | ||
RUN echo "Hello, World!" |