add test for force_rebuild (#448)

see also [forgejo/runner #406](https://code.forgejo.org/forgejo/runner/pulls/406)

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/448
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: gratux <gratux@noreply.code.forgejo.org>
Co-committed-by: gratux <gratux@noreply.code.forgejo.org>
This commit is contained in:
gratux 2025-01-11 15:27:44 +00:00 committed by earl-warren
parent 5e0b4c6419
commit dbe50bffc7
10 changed files with 124 additions and 0 deletions

View file

@ -0,0 +1,5 @@
FROM debian:bookworm-slim
COPY entrypoint.sh /run/entrypoint.sh
# if we rebuild, we should notice this file change
COPY input.txt /run/input.txt
ENTRYPOINT [ "/run/entrypoint.sh" ]

View file

@ -0,0 +1,6 @@
name: local docker action
description: local docker action, build depends on "input.txt"
runs:
using: 'docker'
image: 'Dockerfile'

View file

@ -0,0 +1,3 @@
#! /usr/bin/env bash
set -x
exit "$(< /run/input.txt)"

View file

@ -0,0 +1 @@
this file will be filled by the test

View file

@ -0,0 +1,10 @@
---
on:
push:
jobs:
test:
runs-on: docker
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.forgejo/local-docker-action