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