-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from peng9808/main
add workflows
- Loading branch information
Showing
4 changed files
with
127 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Period check | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 16 * * *' | ||
|
||
jobs: | ||
e2e-test: | ||
runs-on: ["vsphere"] | ||
timeout-minutes: 600 | ||
steps: | ||
- name: delete | ||
run: | | ||
sudo rm -rf /github/actions-runner/_work/datastore/datastore/_build | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: e2e test | ||
env: | ||
E2E_TESTING_LEVEL: "periodCheck" | ||
run: make e2e-test |
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,27 @@ | ||
name: HwameiStor PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "pkg/**" | ||
- "test/**" | ||
|
||
jobs: | ||
pr-test: | ||
runs-on: ["vsphere"] | ||
timeout-minutes: 180 | ||
steps: | ||
- name: delete | ||
run: | | ||
sudo rm -rf rm -rf /github/actions-runner/_work/datastore/datastore/_build | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: pr test | ||
env: | ||
E2E_TESTING_LEVEL: "pr-e2e" | ||
run: make pr-test | ||
|
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,75 @@ | ||
name: Release Datastore | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "helm/operator/Chart.yaml" | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
required: true | ||
type: string | ||
branch: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release-chart: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.7.1 | ||
- name: Set env | ||
run: echo "GIT_ORG=$( echo ${{ github.repository_owner }} | tr 'A-Z' 'a-z' )" >> $GITHUB_ENV | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: helm | ||
charts_repo_url: https://${GIT_ORG}.github.io/datastore | ||
config: helm/.cr/config.yaml | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
release-image: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- release-chart | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ inputs.branch }} | ||
- name: Set up QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: all | ||
- name: Available platforms | ||
run: echo ${{ steps.qemu.outputs.platforms }} | ||
- name: Login registry | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
- name: Set env | ||
run: | | ||
echo "RELEASE_TAG=`[ "${{ inputs.release_tag }}" != "" ] && echo ${{ inputs.release_tag }} || echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV | ||
echo "PROJECT_SOURCE_CODE_DIR=`echo ${GITHUB_WORKSPACE}`" >> $GITHUB_ENV | ||
echo "IMAGE_REGISTRY=`echo ghcr.io/$(echo ${{ github.repository_owner }} | tr 'A-Z' 'a-z')`" >> $GITHUB_ENV | ||
- name: Release image | ||
run: | | ||
PROJECT_SOURCE_CODE_DIR=${PROJECT_SOURCE_CODE_DIR} IMAGE_REGISTRY=${IMAGE_REGISTRY} RELEASE_TAG=${RELEASE_TAG} make 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