Skip to content

feat: (#60)

feat: (#60) #37

Workflow file for this run

name: Pilipala CI
on:
workflow_dispatch:
push:
tags:
- 'v*.*'
env:
IMAGE_NAME: Pilipala
jobs:
build_and_push_image:
runs-on: ubuntu-latest
env:
TZ: Asia/Shanghai
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: build with maven
run: mvn clean install -DskipTests -Pprod
- name: Extract tag name
id: extract_tag
run: echo "TAG_NAME=$(echo $GITHUB_REF | cut -d '/' -f 3)" >> $GITHUB_ENV
- name: login docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: build and push image
uses: docker/build-push-action@v2
with:
context: ./
push: true
tags: cxyjerry/pilipala:${{ env.TAG_NAME }}