summaryrefslogtreecommitdiff
path: root/.forgejo
diff options
context:
space:
mode:
authorcrystal <crystal@noreply.codeberg.org>2024-04-27 18:55:53 -0600
committercrystal <crystal@noreply.codeberg.org>2024-04-27 18:55:53 -0600
commit08f545c3661f36af1f4d493408ee6b00ac4bb223 (patch)
tree14087cbc55c44b457a342100698a49a107366b00 /.forgejo
parent371709d63180b00e4ff59fe01cb9c336ec4b3f3a (diff)
[squash] Switch to Forgejo Actions
Diffstat (limited to '.forgejo')
-rw-r--r--.forgejo/workflows/forgejo-deb.yml215
1 files changed, 215 insertions, 0 deletions
diff --git a/.forgejo/workflows/forgejo-deb.yml b/.forgejo/workflows/forgejo-deb.yml
new file mode 100644
index 0000000..5b5ba99
--- /dev/null
+++ b/.forgejo/workflows/forgejo-deb.yml
@@ -0,0 +1,215 @@
+on: [push]
+jobs:
+ build-forgejo-deb:
+ runs-on: bullseye
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: true
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 20
+
+ - uses: actions/setup-go@v4
+ with:
+ go-version: "1.22"
+ check-latest: true
+
+ - name: "actions prep: build-forgejo-deb"
+ id: ciprep
+ run: ./.ci-make.sh actions-prep build-forgejo-deb
+
+ - name: fetch tags
+ run: |
+ git config --add safe.directory '*'
+ git fetch --tags --force
+ git submodule foreach 'git fetch --tags --force'
+
+ - uses: crystal/install-jq-action@v2.1.0
+ - run: ./.ci-make.sh ci-verify forgejo
+
+ - run: ./.ci-make.sh submodule-make forgejo deps-frontend
+ - run: ./.ci-make.sh submodule-make forgejo deps-backend
+
+ - name: tag pre-condition
+ run: |
+ cd forgejo
+ git update-ref refs/heads/tag_test $(git rev-parse --verify HEAD)
+
+ - run: ./.ci-make.sh submodule-make forgejo security-check
+
+ - run: ./.ci-make.sh submodule-make forgejo frontend
+
+ - run: ./.ci-make.sh submodule-make forgejo checks-backend
+
+ - name: Download Forgejo binary
+ run: ./.ci-make.sh download-binary forgejo-bin-dl
+
+ - name: Build Forgejo for amd64
+ run: ./.ci-make.sh submodule-build forgejo forgejo-bin
+ env:
+ TAGS: bindata
+
+ - name: Build Forgejo (with SQLite) for amd64
+ run: ./.ci-make.sh submodule-build forgejo forgejo-sqlite-bin
+ env:
+ TAGS: bindata sqlite sqlite_unlock_notify
+
+ - run: ./.ci-make.sh package-prep
+ - run: ./.ci-make.sh package-build-deps
+
+ - run: ./.ci-make.sh package-build actions
+
+ - run: ./.ci-make.sh package-clean
+
+ - name: build repo package
+ run: |
+ cd repo-deb
+ ./build.sh actions
+
+ - name: generate sha256
+ run: |
+ ./.ci-make.sh pkg-gen-sha256
+ ./.ci-make.sh preview-sha256
+
+ - run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+ path: |
+ *.deb
+ *.deb.sha256
+ repo-deb/*.deb
+
+ installtest-bookworm-sqlite:
+ runs-on: bookworm
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: "actions prep: installtest"
+ id: ciprep
+ run: ./.ci-make.sh actions-prep installtest
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+
+ - run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ installtest-bullseye-sqlite:
+ runs-on: bullseye
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: "actions prep: installtest"
+ id: ciprep
+ run: ./.ci-make.sh actions-prep installtest
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+
+ - run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ installtest-buster-sqlite:
+ runs-on: buster
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: "actions prep: installtest"
+ id: ciprep
+ run: ./.ci-make.sh actions-prep installtest
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+
+ - run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+
+ installtest-bookworm-user:
+ runs-on: bookworm
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: "actions prep: installtest"
+ id: ciprep
+ run: ./.ci-make.sh actions-prep installtest
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+
+ - run: ./.ci-make.sh test-userinst-prep
+ - run: ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
+
+ testsuite-repo-upgrade-sqlite:
+ runs-on: bookworm
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: "actions prep: installtest"
+ id: ciprep
+ run: ./.ci-make.sh actions-prep installtest
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+
+ - run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo-sqlite
+ - run: ./.ci-make.sh force-clean-forgejo
+ - run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
+ - run: ./.ci-make.sh verify-data-dir-chmod
+
+ installtest-buster-bin:
+ runs-on: buster
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: "actions prep: installtest"
+ id: ciprep
+ run: ./.ci-make.sh actions-prep installtest
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+
+ - run: ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
+
+ publish-release-repo:
+ runs-on: bookworm
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: actions prep
+ id: ciprep
+ run: ./.ci-make.sh actions-prep
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
+
+ - uses: crystal/install-jq-action@v2.1.0
+ - run: mkdir forgejo-release
+ - run: mv *.deb *.deb.sha256 forgejo-release/
+
+ - uses: actions/forgejo-release@v1
+ with:
+ direction: upload
+ url: https://codeberg.org
+ token: ${{ secrets.codeberg_api_key }}
+ release-dir: forgejo-release
+
+ - name: Debian package registry publish
+ env:
+ FORGEJO_SITE: https://code.forgejo.org
+ FORGEJO_OWNER: forgejo-contrib
+ DEBIAN_DIST: bullseye
+ DEBIAN_COMPONENT: forgejo-lts
+ FORGEJO_KEY: ${{ secrets.cfo_api_key }}
+ run: |
+ cd forgejo-release
+ ../.ci-forgejo-apt.sh *.deb
+ cd ..