From 81bdb4a8b3f3bd97489ac4a906b90dfa50975c64 Mon Sep 17 00:00:00 2001 From: Andriy Biletsky Date: Thu, 21 Nov 2024 15:59:12 +0700 Subject: [PATCH] Update github actions --- .github/workflows/test-release.yml | 10 +++++----- Makefile | 13 +++++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index d195c704..7db02e36 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: FedericoCarboni/setup-ffmpeg@v2 + - uses: FedericoCarboni/setup-ffmpeg@v3 - uses: actions/setup-go@v5 with: go-version: '1.23' @@ -92,7 +92,7 @@ jobs: id: release run: | echo "APP_NAME=$(git describe --tags|sed -e 's/\-v.*//')" >> $GITHUB_ENV - echo "APP_VERSION=$(git describe --tags --match 'api-v*'|sed 's/api-v\([0-9.]*\)/\1/')" >> $GITHUB_ENV + echo "APP_VERSION=$(git describe --tags --match '*-v*'|sed 's/.*v\([0-9.]*\).*/\1/')" >> $GITHUB_ENV - name: Release details run: | @@ -102,10 +102,10 @@ jobs: echo "::endgroup::" - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} # odysee-api deployment diff --git a/Makefile b/Makefile index e489ce1a..7fcae0d1 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,16 @@ date := $(shell date "+%Y-%m-%d-%H-%M") git_hash := $(shell git rev-parse --short HEAD) -oapi_version ?= $(shell git describe --tags --match 'api-v*'|sed 's/api-v\([0-9.]*\)/\1/') -watchman_version := $(shell git describe --tags --match 'watchman-v*'|sed 's/api-v\([0-9.]*\)/\1/') -forklift_version ?= $(shell git describe --tags --match 'forklift-v*'|sed 's/forklift-v\([0-9.]*\).*/\1/') -uploads_version ?= $(shell git describe --tags --match 'uploads-v*'|sed 's/uploads-v\([0-9.]*\).*/\1/') +oapi_version ?= $(shell git describe --tags --match 'api-v*'|sed 's/.*v\([0-9.]*\).*/\1/') +watchman_version := $(shell git describe --tags --match 'watchman-v*'|sed 's/.*v\([0-9.]*\).*/\1/') +forklift_version ?= $(shell git describe --tags --match 'forklift-v*'|sed 's/.*v\([0-9.]*\).*/\1/') +uploads_version ?= $(shell git describe --tags --match 'uploads-v*'|sed 's/.*v\([0-9.]*\).*/\1/') go ?= go +.PHONY: versions +versions: + echo $(oapi_version) + echo $(watchman_version) + .PHONY: test test: $(go) test -cover ./...