on: workflow_dispatch: inputs: ref_name: description: 'Tag or commit' required: true type: string jobs: cabal-config-edge: name: Generate cabal config for edge runs-on: x86_64 container: image: alpine:edge env: CI_PROJECT_NAME: git-annex CI_ALPINE_TARGET_RELEASE: edge steps: - name: Environment setup run: apk add nodejs git cabal patch - name: Repo pull uses: actions/checkout@v4 with: fetch-depth: 500 ref: ${{ inputs.ref_name }} - name: Config generation run: | wget 'https://lab.ilot.io/mirrors/git-annex/-/raw/gitlab-ci/ghc-9.8.patch' patch -p1 -i ghc-9.8.patch HOME="${{ github.workspace}}"/cabal_cache cabal update HOME="${{ github.workspace}}"/cabal_cache cabal v2-freeze --shadow-installed-packages --strong-flags --flags="+assistant +webapp +pairing +production +torrentparser +magicmime +benchmark -debuglocks +dbus +networkbsd +gitlfs +httpclientrestricted" mv cabal.project.freeze git-annex-${{ input.ref_name }}-$CI_ALPINE_TARGET_RELEASE.config - name: Package upload uses: forgejo/upload-artifact@v3 with: name: cabalconfigedge path: git-annex* cabal-config-v320: name: Generate cabal config for edge runs-on: x86_64 container: image: alpine:3.20 env: CI_PROJECT_NAME: git-annex CI_ALPINE_TARGET_RELEASE: v3.20 steps: - name: Environment setup run: apk add nodejs git cabal patch - name: Repo pull uses: actions/checkout@v4 with: fetch-depth: 500 ref: ${{ inputs.ref_name }} - name: Config generation run: | wget 'https://lab.ilot.io/mirrors/git-annex/-/raw/gitlab-ci/ghc-9.8.patch' patch -p1 -i ghc-9.8.patch HOME="${{ github.workspace }}"/cabal_cache cabal update HOME="${{ github.workspace }}"/cabal_cache cabal v2-freeze --shadow-installed-packages --strong-flags --flags="+assistant +webapp +pairing +production +torrentparser +magicmime +benchmark -debuglocks +dbus +networkbsd +gitlfs +httpclientrestricted" mv cabal.project.freeze git-annex-${{ input.ref_name }}-$CI_ALPINE_TARGET_RELEASE.config - name: Package upload uses: forgejo/upload-artifact@v3 with: name: cabalconfig320 path: git-annex* upload-tarball: name: Upload to generic repo runs-on: x86_64 needs: [cabal-config-edge,cabal-config-v320] container: image: alpine:latest steps: - name: Environment setup run: apk add nodejs curl findutils - name: Package download uses: forgejo/download-artifact@v3 - name: Package deployment run: | find . curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/git-annex-${{ inputs.ref_name }}.tar.gz ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/${{ inputs.ref_name }}/git-annex-${{ inputs.ref_name}}.tar.gz curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/git-annex-${{ inputs.ref_name }}.tar.gz.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/${{ inputs.ref_name }}/git-annex-${{ inputs.ref_name}}.tar.gz.sha512sum