2024-08-12 06:04:32 +00:00
|
|
|
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
|
2024-08-12 06:18:51 +00:00
|
|
|
run: apk add nodejs git cabal patch wget
|
2024-08-12 06:04:32 +00:00
|
|
|
- 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"
|
2024-08-12 06:17:18 +00:00
|
|
|
find .
|
2024-08-12 06:04:32 +00:00
|
|
|
mv cabal.project.freeze git-annex-${{ input.ref_name }}-$CI_ALPINE_TARGET_RELEASE.config
|
|
|
|
- name: Package upload
|
|
|
|
uses: forgejo/upload-artifact@v3
|
|
|
|
with:
|
2024-08-12 06:11:26 +00:00
|
|
|
name: cabalconfigedge
|
2024-08-12 06:08:37 +00:00
|
|
|
path: git-annex*
|
2024-08-12 06:04:32 +00:00
|
|
|
cabal-config-v320:
|
|
|
|
name: Generate cabal config for edge
|
|
|
|
runs-on: x86_64
|
|
|
|
container:
|
2024-08-12 06:06:16 +00:00
|
|
|
image: alpine:3.20
|
2024-08-12 06:04:32 +00:00
|
|
|
env:
|
|
|
|
CI_PROJECT_NAME: git-annex
|
|
|
|
CI_ALPINE_TARGET_RELEASE: v3.20
|
|
|
|
steps:
|
|
|
|
- name: Environment setup
|
2024-08-12 06:18:51 +00:00
|
|
|
run: apk add nodejs git cabal patch wget
|
2024-08-12 06:04:32 +00:00
|
|
|
- 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
|
2024-08-12 06:17:18 +00:00
|
|
|
find .
|
2024-08-12 06:04:32 +00:00
|
|
|
- name: Package upload
|
|
|
|
uses: forgejo/upload-artifact@v3
|
|
|
|
with:
|
2024-08-12 06:11:26 +00:00
|
|
|
name: cabalconfig320
|
2024-08-12 06:08:37 +00:00
|
|
|
path: git-annex*
|
2024-08-12 06:04:32 +00:00
|
|
|
upload-tarball:
|
|
|
|
name: Upload to generic repo
|
|
|
|
runs-on: x86_64
|
2024-08-12 06:08:37 +00:00
|
|
|
needs: [cabal-config-edge,cabal-config-v320]
|
2024-08-12 06:04:32 +00:00
|
|
|
container:
|
2024-08-12 06:06:16 +00:00
|
|
|
image: alpine:latest
|
2024-08-12 06:04:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Environment setup
|
|
|
|
run: apk add nodejs curl findutils
|
|
|
|
- name: Package download
|
|
|
|
uses: forgejo/download-artifact@v3
|
|
|
|
- name: Package deployment
|
|
|
|
run: |
|
|
|
|
find .
|
2024-08-12 06:17:18 +00:00
|
|
|
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./cabalconfigedge/git-annex.cabal ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/${{ inputs.ref_name }}/git-annex-edge.cabal
|
2024-09-05 21:34:14 +00:00
|
|
|
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./cabalconfig320/git-annex.cabal ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/${{ inputs.ref_name }}/git-annex-v3.20.cabal
|