Change meta step
Some checks failed
Build Mau & Deploy Mau / build (push) Successful in 1m14s
Build Mau & Deploy Mau / deploy (push) Failing after 25s

This commit is contained in:
DTieman
2024-04-14 11:15:47 +02:00
parent d34c79a1af
commit 6a8b81d85a

View File

@@ -9,8 +9,9 @@ concurrency:
env: env:
DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_INSTALL_DIR: "./.dotnet"
DOCKER_LATEST: nightly DOCKER_LATEST: nightly
REPO_OWNER: "mau-mau"
REPO_NAME: "server"
GITEA_INSTANCE_URL: "git.mau-mau.nl" GITEA_INSTANCE_URL: "git.mau-mau.nl"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -19,16 +20,21 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup .NET Core - name: Setup .NET Core
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 7.0.x dotnet-version: 7.0.x
- name: Install dependencies - name: Install dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build
run: dotnet build --configuration Release --no-restore run: dotnet build --configuration Release --no-restore
- name: Test - name: Test
run: dotnet test --no-restore --verbosity normal run: dotnet test --no-restore --verbosity normal
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
@@ -49,11 +55,9 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta - name: Get Version
id: meta id: version
run: | run: |
echo REPO_OWNER=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $1}' ) >> $GITHUB_OUTPUT
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Build and push - name: Build and push
@@ -66,5 +70,5 @@ jobs:
linux/arm64 linux/arm64
push: true push: true
tags: | tags: |
${{ env.GITEA_INSTANCE_URL }}/${{ steps.meta.outputs.REPO_OWNER }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} ${{ env.GITEA_INSTANCE_URL }}/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
${{ env.GITEA_INSTANCE_URL }}/${{ steps.meta.outputs.REPO_OWNER }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} ${{ env.GITEA_INSTANCE_URL }}/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ env.DOCKER_LATEST }}