git-next/.forgejo/workflows/push-next.yml
Paul Campbell 16c02fc4f0
Some checks failed
Rust / build (map[name:stable]) (push) Has been cancelled
Rust / build (map[name:nightly]) (push) Has been cancelled
Rust / docker (push) Failing after 5s
chore: simplify docker image generation
Remove the use of a separate builder image
2024-12-27 18:39:34 +00:00

87 lines
2.2 KiB
YAML

name: Rust
on:
push:
branches: ["next"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: docker
strategy:
matrix:
toolchain:
- name: stable
- name: nightly
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check TODOs
uses: kemitix/todo-checker@v1.2.0
- name: Machete
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo machete
- name: Format
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo fmt --all -- --check
- name: Clippy
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset clippy
- name: Build
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset build
- name: Test
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset test
docker:
runs-on: ubuntu-24.04
steps:
- name: Docker info (init)
run: |
ls -l /var/run/
ls -l /etc/docker/
cat /etc/docker/daemon.json
sudo rm /etc/docker/daemon.json
sudo systemctl restart docker
docker info
- name: Login to Forgejo
uses: docker/login-action@v3
with:
registry: git.kemitix.net
username: ${{ vars.FORGEJO_USERNAME }}
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Docker info (logged in)
run: docker info
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker info (all setup)
run: docker info
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./
push: false # don't push on next, only on main
tags: git.kemitix.net/${{ vars.FORGEJO_USERNAME }}/${{ vars.FORGEJO_IMAGE_NAME }}:latest