2.3 KiB
Gitea Actions Workflows
This directory contains Gitea Actions workflows for automated builds and releases.
Build and Release Workflow
The build-release.yml workflow automatically builds Docker images and attaches them to Gitea releases.
Setup
-
Enable Gitea Actions: Ensure Actions are enabled on your Gitea instance (Settings → Actions)
-
Configure Token: The workflow uses
secrets.GITHUB_TOKENwhich Gitea provides automatically. If your Gitea version uses a different token name, you may need to:- Update the workflow to use
secrets.GITEA_TOKENinstead - Or create a custom token secret in your repository settings
- Update the workflow to use
-
API URL: The workflow uses
github.api_urlwhich Gitea Actions should provide. If you encounter issues, you may need to manually set the Gitea API URL in the workflow.
Usage
Automatic Release on Tag Push:
git tag v1.0.0
git push origin v1.0.0
The workflow will:
- Build a Docker image tagged with the version
- Save it as a compressed tar file
- Create or update a Gitea release
- Attach the tar file to the release
Manual Trigger: You can also trigger the workflow manually from the Gitea Actions UI. The image will be saved as an artifact (not attached to a release).
Loading the Image
After downloading the .tar.gz file from a release:
# Load the image
docker load < automatic-linkedin-answer-ai-v1.0.0.tar.gz
# Verify it's loaded
docker images | grep automatic-linkedin-answer-ai
# Run the container
docker run -it \
-v $(pwd)/config.yaml:/app/config.yaml \
-v $(pwd)/docs:/app/docs \
automatic-linkedin-answer-ai:v1.0.0
Troubleshooting
Workflow fails with authentication errors:
- Check that Actions are enabled on your Gitea instance
- Verify the token secret is available (should be automatic with Gitea Actions)
- If using a self-hosted Gitea, ensure the API URL is accessible from the runner
Release not created:
- Ensure you're pushing a tag that matches the pattern
v*(e.g.,v1.0.0) - Check the workflow logs for specific error messages
- Verify you have write permissions to the repository
Image too large:
- The workflow compresses the image with gzip
- Consider using multi-stage builds in the Dockerfile to reduce image size
- You may need to adjust Gitea's upload size limits if the image is very large