Skip to content

feat: 实现点赞 (#64) #38

feat: 实现点赞 (#64)

feat: 实现点赞 (#64) #38

name: docker-publish-ghcr
on:
push:
branches: [ "master" ]
tags: [ 'v*' ]
paths-ignore:
- '**.md'
# - '**/resources/static/'
check_suite:
types: [ "completed" ]
env:
REGISTRY: ghcr.io
REPOSITORY: bantanger/achobeta
TAG: ${{ github.sha }}
jobs:
run_tag_job:
name: merge pr run tag script
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./polaris-app
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: run tag script job
run: ./polaris-app/tag-polaris.sh
build:
runs-on: ubuntu-latest
if: (github.repository == 'AchoBeta/achobeta-polaris')
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: BanTanger
password: ${{ secrets.GHCR_IO_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Build with Maven
run: mvn clean install package -Dmaven.test.skip=true
- name: Build and push (ghcr.io)
uses: docker/build-push-action@v3
with:
context: ./polaris-app
file: ./polaris-app/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REGISTRY }}/${{ env.REPOSITORY }}/polaris:latest
${{ env.REGISTRY }}/${{ env.REPOSITORY }}/polaris:${{ env.TAG }}