Ver código fonte

ci: fix Gemfury uploads from the release workflow

Environment secrets resolve to empty strings in called workflows unless
the caller passes secrets: inherit, so the 2.3.6 packages were rejected
as unauthorized while the jobs still passed.

Inherit secrets in the Release workflow and make curl fail on HTTP
errors.
Frédéric Guillot 1 dia atrás
pai
commit
b7b8ab8098

+ 1 - 1
.github/workflows/debian_packages.yml

@@ -101,4 +101,4 @@ jobs:
     - name: Upload packages to repository
       env:
         FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
-      run: for f in *.deb; do curl -F package=@"$f" https://$FURY_TOKEN@push.fury.io/miniflux/; done
+      run: for f in *.deb; do curl --fail-with-body -F package=@"$f" https://$FURY_TOKEN@push.fury.io/miniflux/; done

+ 4 - 2
.github/workflows/release.yml

@@ -11,10 +11,12 @@ jobs:
     uses: ./.github/workflows/build_binaries.yml # zizmor: ignore[self-repository]
   debian-packages:
     name: Debian Packages
-    uses: ./.github/workflows/debian_packages.yml # zizmor: ignore[self-repository]
+    uses: ./.github/workflows/debian_packages.yml # zizmor: ignore[self-repository,secrets-inherit]
+    secrets: inherit
   rpm-packages:
     name: RPM Packages
-    uses: ./.github/workflows/rpm_packages.yml # zizmor: ignore[self-repository]
+    uses: ./.github/workflows/rpm_packages.yml # zizmor: ignore[self-repository,secrets-inherit]
+    secrets: inherit
   draft-release:
     name: Draft Release
     if: github.repository_owner == 'miniflux'

+ 1 - 1
.github/workflows/rpm_packages.yml

@@ -68,4 +68,4 @@ jobs:
     - name: Upload package to repository
       env:
         FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
-      run: for f in *.rpm; do curl -F package=@"$f" https://$FURY_TOKEN@push.fury.io/miniflux/; done
+      run: for f in *.rpm; do curl --fail-with-body -F package=@"$f" https://$FURY_TOKEN@push.fury.io/miniflux/; done