earl-warren
8bcc130986
All checks were successful
/ build-test (push) Successful in 6m23s
Reviewed-on: #15 |
||
---|---|---|
.forgejo/workflows | ||
build | ||
publish | ||
testdata | ||
.gitignore | ||
LICENSE | ||
README.md | ||
test.sh |
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). 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://code.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://code.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://code.forgejo.org/actions/setup-forgejo
export PATH=$(pwd)/setup-forgejo:$PATH
git clone https://code.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.
ADM64_ONLY=true ./test.sh run
- Teardown
./test.sh teardown
- Update the README from the actions file with https://github.com/npalm/action-docs
action-docs --update-readme