An action to build and publish Forgejo releases
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-02-23 14:03:36 +00:00
.forgejo/workflows chore(cleanup): use data.forgejo.org 2025-01-15 15:42:33 +01:00
build fix: verify labels on the image including the suffix 2025-02-23 14:48:34 +01:00
publish chore(cleanup): use data.forgejo.org 2025-01-15 15:42:33 +01:00
testdata chore(cleanup): use data.forgejo.org 2025-01-15 15:42:33 +01:00
.editorconfig add .editorconfig and run shfmt -w test.sh 2024-05-24 22:19:12 +02:00
.gitignore initial implementation 2023-08-25 10:35:35 +02:00
LICENSE initial implementation 2023-08-25 10:35:35 +02:00
README.md chore(cleanup): use data.forgejo.org 2025-01-15 15:42:33 +01:00
runner-config.yaml replace forgejo-container-image with skopeo 2024-05-24 19:59:15 +02:00
test.sh feat(ci): handle multiple tags 2025-01-06 13:36:53 +01:00

forgejo-build-publish

This repository contains two actions that can be used together.

This action is not designed to be used in an application container (Docker, podman), it needs to run on an actual machine or a system container (LXC) with Debian GNU/Linux bookworm.

See the Forgejo runner documentation for more information.

The forgejo-build-publish/build action will build multi-architecture binaries and OCI images and upload them to a Forgejo user/organization.

The forgejo-build-publish/publish action will copy and optionally sign binaries and OCI images from one user/organization to another.

Example

      - uses: https://data.forgejo.org/forgejo/forgejo-build-publish/build@v1
        with:
          forgejo: "${{ env.GITHUB_SERVER_URL }}"
          owner: "${{ env.GITHUB_REPOSITORY_OWNER }}"
          repository: "${{ steps.repository.outputs.value }}"
          doer: "release-team"
          tag-version: "${{ steps.tag-version.outputs.value }}"
          token: "FORGEJO_TOKEN"
          platforms: linux/amd64,linux/arm64
          release-notes: "RELEASE-NOTES"
          binary-name: software
          binary-path: /bin/software
          dockerfile: Dockerfile

      - uses: https://data.forgejo.org/forgejo/forgejo-build-publish/publish@v1
        with:
          from-forgejo: "${{ env.GITHUB_SERVER_URL }}"
          from-owner: "${{ env.GITHUB_REPOSITORY_OWNER }}"
          to-forgejo: "${{ env.GITHUB_SERVER_URL }}"
          to-owner: "forgejo-experimental"
          to-doer: "releaes-team"
          to-token: "FORGEJO_TOKEN"
	  repo: myrepo
          ref-name: ${{ github.ref_name }}
          container-suffixes: " "

Hacking

docker and sudo must be installed with insecure registries allowed in /etc/docker/daemon.json for the IP that will be used for forgejo such as:

{
  "insecure-registries": [ "10.0.0.0/8" ]
}

Requires LXC

git clone https://data.forgejo.org/actions/setup-forgejo
export PATH=$(pwd)/setup-forgejo:$PATH
git clone https://data.forgejo.org/actions/forgejo-build-publish
cd forgejo-build-publish
export DIR=/tmp/forgejo-build-publish
  • Run the test

Will call firefox on the Forgejo instance running the tests. It can build only for one target architecture if the debugging is not about that. Setting up binfmt properly is not for the faint of heart.

AMD64_ONLY=true ./test.sh run
  • Teardown

./test.sh teardown