diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5d479fb..58ec907 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -51,14 +51,17 @@ jobs: echo "Version must match!" exit -1 fi - # - name: Build and publish - # env: - # GITEA_USERNAME: gitearobot - # GITEA_PASSWORD: ${{ secrets.PACKAGE_GITEA_PAT }} - # run: | - # REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}') - # REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_') - # dotnet nuget add source --name gitea --username $GITEA_USERNAME --password $GITEA_PASSWORD https://git.disi.dev/api/packages/$REPOSITORY_OWNER/nuget/index.json - # dotnet pack --include-symbols --include-source -p:PackageVersion=$(cat $REPOSITORY_NAME/VERSION) song_of_the_day.sln - # dotnet nuget push --source gitea $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).nupkg - # dotnet nuget push --source gitea $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).symbols.nupkg + - name: Login to Gitea conteiner registry + uses: docker/login-action@v3 + with: + username: gitearobot + password: ${{ secrets.PACKAGE_GITEA_PAT }} + registry: git.disi.dev + - name: Build and publish + env: + GITEA_USERNAME: gitearobot + GITEA_PASSWORD: ${{ secrets.PACKAGE_GITEA_PAT }} + run: | + REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_') + docker build -t "git.disi.dev/song-of-the-day:$(cat $REPOSITORY_NAME/VERSION)" ./song_of_the_day + docker push "git.disi.dev/song-of-the-day:$(cat $REPOSITORY_NAME/VERSION)"