34 lines
882 B
YAML
34 lines
882 B
YAML
name: Gitea Actions Demo
|
|
on: [push]
|
|
jobs:
|
|
Gitea-Actions:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
# volumes:
|
|
# - ubuntu_hostedtoolcache:/opt/hostedtoolcache
|
|
# - gradle_cache:/root/.gradle
|
|
env:
|
|
DOCKER_REGISTRY: registry.cn-hangzhou.aliyuncs.com
|
|
DOCKER_USERNAME: rsjst
|
|
steps:
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: zulu
|
|
java-version: 11
|
|
cache: gradle
|
|
|
|
|
|
- name: Get Meta
|
|
id: meta
|
|
run: |
|
|
echo ::set-output name=REPO::`echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}'`
|
|
echo ::set-output name=VERSION::`git describe --abbrev=0 --tags | awk -F"v" '{print $2}'`
|
|
|
|
|
|
|
|
- run: echo ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/${{ steps.meta.outputs.REPO }}:latest
|
|
|