syntax changes
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
- workflow_call
|
||||
|
||||
jobs:
|
||||
release:
|
||||
env:
|
||||
REGISTRY: gitea.mrcynic.site
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: metadata
|
||||
id: meta
|
||||
run: |
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
||||
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
||||
echo DOCKER_ORG=$(echo ${GITEA_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]') >> $GITEA_OUTPUT
|
||||
cat $GITHUB_OUTPUT
|
||||
|
||||
- name: registry login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: publish docker
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||
${{ env.REGISTRY }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:latest
|
||||
35
release.yml
Normal file
35
release.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
name: go-release
|
||||
description: Go Release Workflow
|
||||
|
||||
runs:
|
||||
env:
|
||||
REGISTRY: gitea.mrcynic.site
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: metadata
|
||||
id: meta
|
||||
run: |
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
||||
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
||||
echo DOCKER_ORG=$(echo ${GITEA_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]') >> $GITEA_OUTPUT
|
||||
cat $GITHUB_OUTPUT
|
||||
|
||||
- name: registry login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: publish docker
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||
${{ env.REGISTRY }}/${{ steps.meta.outputs.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:latest
|
||||
Reference in New Issue
Block a user