+22
-51
@@ -1,60 +1,31 @@
|
||||
name: build
|
||||
name: ci
|
||||
|
||||
on: [ push ]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: bootstrap
|
||||
uses: actions/nix/develop@main
|
||||
|
||||
- name: test & coverage
|
||||
id: coverage
|
||||
uses: actions/nix/develop@main
|
||||
with:
|
||||
run: |
|
||||
cargo tarpaulin --tests --engine llvm --exclude-files src/main.rs | tee build.log
|
||||
tail -n 1 build.log | sed -e 's/^/coverage=/' >>"${GITHUB_OUTPUT}"
|
||||
|
||||
- name: summary
|
||||
run: |
|
||||
echo ${{ steps.coverage.outputs.coverage }}
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: build
|
||||
uses: actions/nix/build@main
|
||||
with:
|
||||
package: ironforge
|
||||
|
||||
- name: build the container image
|
||||
uses: actions/nix/build@main
|
||||
with:
|
||||
package: container-image
|
||||
|
||||
- name: load the container image into docker
|
||||
run: |
|
||||
docker load <result
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ coverage, build ]
|
||||
steps:
|
||||
- name: login to the container registry
|
||||
uses: https://code.forgejo.org/docker/login-action@v2
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.nicholaspease.com
|
||||
username: npease
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: publish
|
||||
run: |
|
||||
docker push gitea.nicholaspease.com/npease/ironforge:latest
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest
|
||||
@@ -8,7 +8,7 @@ ironforge
|
||||
[container:badge]: https://img.shields.io/badge/container-ironforge:latest-blue?style=for-the-badge
|
||||
[container:url]: https://git.madhouse-project.org/algernon/-/packages/container/ironforge/latest
|
||||
|
||||
A lightweight bridge between Forgejo Actions and shields.io.
|
||||
A lightweight bridge between Gitea Actions and shields.io.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# This is a more or less default configuration for Ironforge.
|
||||
# Unless noted otherwise, all settings here use the default values.
|
||||
|
||||
[server]
|
||||
# The address and port to listen on.
|
||||
#
|
||||
# ⚠ There is no default, this must be set explicitly.
|
||||
listen_addr = "0.0.0.0:3000"
|
||||
|
||||
[server.cache]
|
||||
# Whether to enable caching.
|
||||
#
|
||||
# If enabled, badges will be cached in-memory (keyed by the URL they are
|
||||
# fetched from), with no expiry. Caching improves performance a *lot*, and
|
||||
# reduces the reliance on shields.io.
|
||||
#
|
||||
# Becaue it is all stored in-memory, only enable this if you expect to have a
|
||||
# small number of badges.
|
||||
#enable = false
|
||||
|
||||
[forge]
|
||||
# URL for the Forgejo/Gitea instance to ask for Action statuses.
|
||||
#
|
||||
# ⚠ There is no default, this must be set explicitly.
|
||||
url = "https://gitea.nicholaspease.com"
|
||||
# Branch to check for action statuses. The `branch` query parameter can override this.
|
||||
#branch = "main"
|
||||
|
||||
[badges]
|
||||
# A shields.io URL to redirect to for badges.
|
||||
#shields_url = "https://img.shields.io"
|
||||
# Label to use for the badge. The `label` query parameter can override this.
|
||||
#label = "ci"
|
||||
# Style to use for the badge. The `style` query parameter can override this.
|
||||
#style = "for-the-badge"
|
||||
|
||||
# Action status to color mappings. These set the background color of the
|
||||
# content part of the badge.
|
||||
[badges.color]
|
||||
#success = "brightgreen"
|
||||
#pending = "lightgrey"
|
||||
#error = "lightgrey"
|
||||
#failure = "crimson"
|
||||
#warning = "orange"
|
||||
#running = "gold"
|
||||
#unknown = "lightgrey"
|
||||
Reference in New Issue
Block a user