diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c2180928..bda5ad73 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -91,6 +91,9 @@ jobs: registry: https://git.linuxcrack.zip username: ${{ gitea.actor }} password: ${{ secrets.USER_TOKEN }} + - name: Get current tag + id: get_tag + run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: @@ -98,3 +101,21 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} + - name: Upload artefacts + uses: christopherhx/gitea-upload-artifact@v4 + with: + url: https://git.linuxcrack.zip + path: | + dist/*.tar.gz + dist/*.zip + dist/*.exe + dist/*.txt + if-no-files-found: error + compression-level: 0 + - name: Push Docker images to registry + run: |- + TAG=${{ steps.get_tag.outputs.tag }} + for arch in amd64 arm64; do + docker tag filebrowser/filebrowser:${TAG}-$arch git.linuxcrack.zip/midou/filebrowser:${TAG}-$arch + docker push git.linuxcrack.zip/midou/filebrowser:${TAG}-$arch + done diff --git a/.github/workflows/pr-lint.yaml b/.github/workflows/pr-lint.yaml index f2878cf2..db76b47e 100644 --- a/.github/workflows/pr-lint.yaml +++ b/.github/workflows/pr-lint.yaml @@ -1,16 +1,10 @@ -name: "Lint PR" - +--- +name: Lint PR on: pull_request_target: - types: - - opened - - reopened - - edited - - synchronize - + types: [opened, reopened, edited, synchronize] permissions: pull-requests: write - jobs: main: name: Validate PR title @@ -19,8 +13,7 @@ jobs: - uses: amannn/action-semantic-pull-request@v5 id: lint_pr_title env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} - uses: marocchino/sticky-pull-request-comment@v2 # When the previous steps fails, the workflow would stop. By adding this # condition you can continue the execution with the populated error message. @@ -29,11 +22,8 @@ jobs: header: pr-title-lint-error message: | Hey there and thank you for opening this pull request! 👋🏼 - We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. - Details: - ``` ${{ steps.lint_pr_title.outputs.error_message }} ``` @@ -43,4 +33,4 @@ jobs: uses: marocchino/sticky-pull-request-comment@v2 with: header: pr-title-lint-error - delete: true \ No newline at end of file + delete: true