1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00

fix(ci): use code.forgejo.org instead of the docker hub (#762)

- use https://code.forgejo.org/forgejo/hello-world-docker-action/ that is a copy of https://github.com/actions/hello-world-docker-action/ with a patch to not use the docker hub
- node:16-buster-slim replaced with code.forgejo.org/oci/node:22 and checked that whatever is tested with it is not likely to be disturbed by the change in version
- change base images of Dockerfile to be from code.forgejo.org/oci/ equivalents
- use code.forgejo.org/forgejo/runner:8 instead of catthehacker/ubuntu:runner-latest

To test services:

- use code.forgejo.org/oci/bitnami/postgresql:16 instead of postgres:12
- use code.forgejo.org/oci/apache-git:1 instead of nginx:latest

Skip flaky test and [open an issue for it](https://code.forgejo.org/forgejo/runner/issues/763).

---

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/762): <!--number 762 --><!--line 0 --><!--description Zml4KGNpKTogdXNlIGNvZGUuZm9yZ2Vqby5vcmcgaW5zdGVhZCBvZiB0aGUgZG9ja2VyIGh1Yg==-->fix(ci): use code.forgejo.org instead of the docker hub<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/762
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
Earl Warren 2025-07-29 15:37:16 +00:00 committed by earl-warren
parent a6fa98926c
commit a9ecd52de8
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
17 changed files with 47 additions and 49 deletions

View file

@ -407,6 +407,7 @@ func TestRunner_DockerActionForcePullForceRebuild(t *testing.T) {
}
func TestRunner_RunDifferentArchitecture(t *testing.T) {
t.Skip("Flaky see https://code.forgejo.org/forgejo/runner/issues/763")
if testing.Short() {
t.Skip("skipping integration test")
}

View file

@ -1 +1 @@
FROM ubuntu:18.04
FROM code.forgejo.org/oci/node:22

View file

@ -1,5 +1,5 @@
# Container image that runs your code
FROM node:12-buster-slim
FROM code.forgejo.org/oci/node:22
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

View file

@ -1,5 +1,5 @@
# Container image that runs your code
FROM node:16-buster-slim
FROM code.forgejo.org/oci/node:22
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

View file

@ -8,7 +8,7 @@ inputs:
default: World
runs:
using: docker
image: docker://node:16-buster-slim
image: docker://code.forgejo.org/oci/node:22
entrypoint: /bin/sh -c
env:
TEST: enabled

View file

@ -11,7 +11,7 @@ jobs:
- run: '[[ "$(pwd)" == "${GITHUB_WORKSPACE}" ]]'
- run: echo ${{ env.TEST }} | grep value
- run: env
- uses: docker://node:16-buster-slim
- uses: docker://code.forgejo.org/oci/node:22
with:
somekey: ${{ env.TEST }}
args: echo ${INPUT_SOMEKEY} | grep somevalue
@ -31,10 +31,10 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: docker://node:16-buster-slim
- uses: docker://code.forgejo.org/oci/node:22
with:
args: env
- uses: docker://node:16-buster-slim
- uses: docker://code.forgejo.org/oci/node:22
with:
entrypoint: /bin/echo
args: ${{github.event_name}}

View file

@ -10,6 +10,6 @@ jobs:
steps:
- name: hello
uses: https://github.com/actions/hello-world-docker-action@v1
uses: https://code.forgejo.org/forgejo/hello-world-docker-action@v1
with:
who-to-greet: "World"

View file

@ -5,6 +5,6 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:runner-latest # image with user 'runner:runner' built on tag 'act-latest'
image: code.forgejo.org/forgejo/runner:8
steps:
- run: echo PASS

View file

@ -32,7 +32,7 @@ runs:
shell: bash
- uses: ./localdockerimagetest_
# Also test a remote docker action here
- uses: https://github.com/actions/hello-world-docker-action@v1
- uses: https://code.forgejo.org/forgejo/hello-world-docker-action@v1
with:
who-to-greet: 'Mona the Octocat'
# Test if GITHUB_ACTION_PATH is set correctly after all steps

View file

@ -5,6 +5,6 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/hello-world-docker-action@v1
- uses: https://code.forgejo.org/forgejo/hello-world-docker-action@v1
with:
who-to-greet: 'Mona the Octocat'

View file

@ -8,9 +8,7 @@ jobs:
image: code.forgejo.org/oci/node:22-bookworm
services:
nginx:
image: "nginx:latest"
ports:
- "8080:80"
image: "code.forgejo.org/oci/apache-git:1"
steps:
- run: apt-get -qq update && apt-get -yqq install --no-install-recommends curl
- run: curl -v http://nginx:80

View file

@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
image: code.forgejo.org/oci/bitnami/postgresql:16
env:
POSTGRES_USER: runner
POSTGRES_PASSWORD: mysecretdbpass

View file

@ -5,19 +5,18 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: docker://node:16-buster-slim
- uses: docker://code.forgejo.org/oci/node:22
with:
somekey: somevalue
args: echo ${INPUT_SOMEKEY} | grep somevalue
- uses: docker://node:16-buster-slim
- uses: docker://code.forgejo.org/oci/node:22
with:
args: -v
- uses: docker://node:16-buster-slim
- uses: docker://code.forgejo.org/oci/node:22
with:
entrypoint: /bin/sh
args: -c -- uname -a
- uses: docker://node:16-buster-slim
- uses: docker://code.forgejo.org/oci/node:22
with:
entrypoint: /bin/sh
args: -c 'uname -a'

View file

@ -4,4 +4,4 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/hello-world-docker-action@b136eb8894c5cb1dd5807da824be97ccdf9b5423
- uses: https://code.forgejo.org/forgejo/hello-world-docker-action@4b60c28ca1d0868e9c6efc0d8274b32cba37717a

View file

@ -4,4 +4,4 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/hello-world-docker-action@b136eb8
- uses: https://code.forgejo.org/forgejo/hello-world-docker-action@4b60c28