Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
puhaiyang committed Aug 20, 2022
2 parents b51db97 + 6c3a1b7 commit bf274cf
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

env:
TKE_IMAGE_REGISTRY: http://ccr.ccs.tencentyun.com/haiyang/swagger2word
TKE_IMAGE_URL: ccr.ccs.tencentyun.com/haiyang/swagger2word
TKE_REGION: ap-guangzhou
TKE_CLUSTER_ID: cls-mywebapp
DEPLOYMENT_NAME: tke-test
TENCENT_CLOUD_ACCOUNT_ID: ${{ secrets.TENCENT_CLOUD_ACCOUNT_ID }}
TKE_REGISTRY_PASSWORD: ${{ secrets.TKE_REGISTRY_PASSWORD }}

name: Java CI with Maven

on:
push:
page_build:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

environment: tencent
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
Expand All @@ -24,3 +32,13 @@ jobs:
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Build Docker image
run: |
docker build -t ${TKE_IMAGE_URL}:${GITHUB_SHA} .
- name: Login TKE Registry
run: |
docker login -u ${TENCENT_CLOUD_ACCOUNT_ID} -p '${TKE_REGISTRY_PASSWORD}' ${TKE_IMAGE_REGISTRY}
# Push the Docker image to TKE Registry
- name: Publish
run: |
docker push ${TKE_IMAGE_URL}:${GITHUB_SHA}

0 comments on commit bf274cf

Please sign in to comment.