From e10cdef8dd9b61bcb4e73d678b5de3f3516ef181 Mon Sep 17 00:00:00 2001 From: DTieman Date: Sun, 14 Apr 2024 11:43:24 +0200 Subject: [PATCH] Added checkout step to deploy step --- .gitea/workflows/main.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml index ee8a6fc..f81eb64 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main.yaml @@ -9,8 +9,6 @@ concurrency: env: DOTNET_INSTALL_DIR: "./.dotnet" DOCKER_LATEST: nightly - REPO_OWNER: "mau-mau" - REPO_NAME: "server" GITEA_INSTANCE_URL: "git.mau-mau.nl" jobs: build: @@ -40,6 +38,11 @@ jobs: needs: build if: gitea.ref == 'refs/heads/mauster' steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Docker BuildX uses: docker/setup-buildx-action@v2 with: @@ -55,9 +58,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Get Version - id: version + - name: Get Meta + id: meta 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 - name: Build and push @@ -70,5 +75,5 @@ jobs: linux/arm64 push: true tags: | - ${{ env.GITEA_INSTANCE_URL }}/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} - ${{ env.GITEA_INSTANCE_URL }}/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ env.DOCKER_LATEST }} \ No newline at end of file + ${{ env.GITEA_INSTANCE_URL }}/${{ steps.meta.outputs.REPO_OWNER }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} + ${{ env.GITEA_INSTANCE_URL }}/${{ steps.meta.outputs.REPO_OWNER }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} \ No newline at end of file