增加minikube部署轻量kubernetes文档 #21
Workflow file for this run
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
name: Maven Build and Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get tag | |
id: tag | |
uses: devops-actions/[email protected] | |
with: | |
strip_v: false # Optional: Remove 'v' character from version | |
default: v0.0.0 # Optional: Default version when tag not found | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build with Maven | |
run: mvn clean install -DskipTests | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSON_TOKEN }} | |
with: | |
tag_name: ${{steps.tag.outputs.tag}} | |
release_name: Release ${{steps.tag.outputs.tag}} | |
body: | | |
This is a release for version ${{steps.tag.outputs.tag}} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSON_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./cloudeon-assembly/target/cloudeon-assembly-${{steps.tag.outputs.tag}}-release.tar.gz | |
asset_name: cloudeon-assembly-${{steps.tag.outputs.tag}}-release.tar.gz | |
asset_content_type: application/gzip | |
- name: Build the Docker image | |
run: cp -r cloudeon-assembly/target/cloudeon-assembly-${{steps.tag.outputs.tag}}-release ./docker | |
- name: build docker image for aliyun | |
run: docker login --username=${{ secrets.ALIYUN_DOCKER_USERNAME }} --password ${{ secrets.ALIYUN_DOCKER_PASSWORD }} registry.cn-hangzhou.aliyuncs.com && docker build -f docker/Dockerfile --build-arg CLOUDEON_VERSION=${{steps.tag.outputs.tag}} -t cloudeon:${{steps.tag.outputs.tag}} ./docker && docker tag cloudeon:${{steps.tag.outputs.tag}} registry.cn-hangzhou.aliyuncs.com/udh/cloudeon:${{steps.tag.outputs.tag}} && docker push registry.cn-hangzhou.aliyuncs.com/udh/cloudeon:${{steps.tag.outputs.tag}} | |