huanghs 44d2b447ca
All checks were successful
Gitea-Actions
更新 '.gitea/workflows/build.yaml'
2023-03-24 11:30:41 +08:00

46 lines
1.4 KiB
YAML

name: Gitea Actions Demo
on:
push:
tags:
- v*
jobs:
Gitea-Actions:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
volumes:
- ubuntu_hostedtoolcache:/opt/hostedtoolcache
env:
DOCKER_REGISTRY: registry.cn-hangzhou.aliyuncs.com
DOCKER_USERNAME: rsjst
steps:
- name: Checkout
uses: actions/checkout@v3
- run: cat README.md
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- run: java -version
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(echo ${{ github.ref }} | awk -F"/" '{print $3}' | awk -F"v" '{print $2}') >> $GITHUB_OUTPUT
- run: echo ${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
- name: WeChat Work notification
uses: seepine/action-wechat-work@master
if: ${{ env.WECHAT_WORK_BOT_WEBHOOK != '' }}
env:
WECHAT_WORK_BOT_WEBHOOK: ${{ secrets.WECHAT_WORK_BOT_WEBHOOK }}
with:
msgtype: markdown
content: "${{ steps.meta.outputs.REPO_NAME }}构建成功。\n
> 镜像: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}"