From c9cd778f31fa4f88d8372712f5b547f8d5f67c8f Mon Sep 17 00:00:00 2001 From: Brian Bjarke Jensen Date: Sun, 25 Feb 2024 17:03:35 +0100 Subject: [PATCH] updated workflow --- .gitea/workflows/publish.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index cad7372..e4fef86 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -36,8 +36,16 @@ jobs: uses: actions/checkout@v3 - name: Set Environment Variables run: | - echo "sha_short=$(git rev-parse --short "$GITEA_SHA")" >> "$GITEA_ENV" - - name: Print Env Vars + echo $(git rev-parse --short ${{ gitea.sha }}) + echo "sha_short=$(git rev-parse --short ${{ gitea.sha }} )" >> "$GITHUB_ENV" + - name: Show Environment Variables run: | - echo "Branch: ${{ env.branch }}" - echo "Sha: ${{ env.sha_short }}" + echo "DOCKER_REPO_URL: ${{ vars.docker_repo_url }}" + echo "REPOSITORY: ${{ gitea.repository }}" + echo "COMMIT_SHA: ${{ env.sha_short }}" + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{vars.docker_repo_url}}/${{gitea.repository}}:latest