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:
parent
a6fa98926c
commit
a9ecd52de8
17 changed files with 47 additions and 49 deletions
|
@ -407,6 +407,7 @@ func TestRunner_DockerActionForcePullForceRebuild(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRunner_RunDifferentArchitecture(t *testing.T) {
|
func TestRunner_RunDifferentArchitecture(t *testing.T) {
|
||||||
|
t.Skip("Flaky see https://code.forgejo.org/forgejo/runner/issues/763")
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("skipping integration test")
|
t.Skip("skipping integration test")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
FROM ubuntu:18.04
|
FROM code.forgejo.org/oci/node:22
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
outputs:
|
outputs:
|
||||||
customoutput:
|
customoutput:
|
||||||
value: my-customoutput-${{ steps.random-color-generator.outputs.SELECTED_COLOR }}
|
value: my-customoutput-${{ steps.random-color-generator.outputs.SELECTED_COLOR }}
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Set selected color
|
- name: Set selected color
|
||||||
run: echo '::set-output name=SELECTED_COLOR::green'
|
run: echo '::set-output name=SELECTED_COLOR::green'
|
||||||
id: random-color-generator
|
id: random-color-generator
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: fail
|
- name: fail
|
||||||
run: exit 1
|
run: exit 1
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Container image that runs your code
|
# 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
|
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Container image that runs your code
|
# 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
|
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
|
@ -8,7 +8,7 @@ inputs:
|
||||||
default: World
|
default: World
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: docker://node:16-buster-slim
|
image: docker://code.forgejo.org/oci/node:22
|
||||||
entrypoint: /bin/sh -c
|
entrypoint: /bin/sh -c
|
||||||
env:
|
env:
|
||||||
TEST: enabled
|
TEST: enabled
|
||||||
|
|
6
act/runner/testdata/basic/push.yml
vendored
6
act/runner/testdata/basic/push.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
||||||
- run: '[[ "$(pwd)" == "${GITHUB_WORKSPACE}" ]]'
|
- run: '[[ "$(pwd)" == "${GITHUB_WORKSPACE}" ]]'
|
||||||
- run: echo ${{ env.TEST }} | grep value
|
- run: echo ${{ env.TEST }} | grep value
|
||||||
- run: env
|
- run: env
|
||||||
- uses: docker://node:16-buster-slim
|
- uses: docker://code.forgejo.org/oci/node:22
|
||||||
with:
|
with:
|
||||||
somekey: ${{ env.TEST }}
|
somekey: ${{ env.TEST }}
|
||||||
args: echo ${INPUT_SOMEKEY} | grep somevalue
|
args: echo ${INPUT_SOMEKEY} | grep somevalue
|
||||||
|
@ -31,10 +31,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
- uses: docker://node:16-buster-slim
|
- uses: docker://code.forgejo.org/oci/node:22
|
||||||
with:
|
with:
|
||||||
args: env
|
args: env
|
||||||
- uses: docker://node:16-buster-slim
|
- uses: docker://code.forgejo.org/oci/node:22
|
||||||
with:
|
with:
|
||||||
entrypoint: /bin/echo
|
entrypoint: /bin/echo
|
||||||
args: ${{github.event_name}}
|
args: ${{github.event_name}}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
name: composite-fail-with-output
|
name: composite-fail-with-output
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-for-output:
|
test-for-output:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://data.forgejo.org/actions/checkout@v2
|
- uses: https://data.forgejo.org/actions/checkout@v2
|
||||||
- uses: ./actions/composite-fail-with-output
|
- uses: ./actions/composite-fail-with-output
|
||||||
id: composite-fail-with-output
|
id: composite-fail-with-output
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- run: |
|
- run: |
|
||||||
echo ${{steps.composite-fail-with-output.outputs.customoutput}}
|
echo ${{steps.composite-fail-with-output.outputs.customoutput}}
|
||||||
exit ${{steps.composite-fail-with-output.outputs.customoutput == 'my-customoutput-green' && '0' || '1'}}
|
exit ${{steps.composite-fail-with-output.outputs.customoutput == 'my-customoutput-green' && '0' || '1'}}
|
||||||
|
|
2
act/runner/testdata/issue-104/main.yaml
vendored
2
act/runner/testdata/issue-104/main.yaml
vendored
|
@ -10,6 +10,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: hello
|
- name: hello
|
||||||
uses: https://github.com/actions/hello-world-docker-action@v1
|
uses: https://code.forgejo.org/forgejo/hello-world-docker-action@v1
|
||||||
with:
|
with:
|
||||||
who-to-greet: "World"
|
who-to-greet: "World"
|
||||||
|
|
|
@ -5,6 +5,6 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:runner-latest # image with user 'runner:runner' built on tag 'act-latest'
|
image: code.forgejo.org/forgejo/runner:8
|
||||||
steps:
|
steps:
|
||||||
- run: echo PASS
|
- run: echo PASS
|
||||||
|
|
|
@ -32,7 +32,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
- uses: ./localdockerimagetest_
|
- uses: ./localdockerimagetest_
|
||||||
# Also test a remote docker action here
|
# 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:
|
with:
|
||||||
who-to-greet: 'Mona the Octocat'
|
who-to-greet: 'Mona the Octocat'
|
||||||
# Test if GITHUB_ACTION_PATH is set correctly after all steps
|
# Test if GITHUB_ACTION_PATH is set correctly after all steps
|
||||||
|
|
|
@ -5,6 +5,6 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://github.com/actions/hello-world-docker-action@v1
|
- uses: https://code.forgejo.org/forgejo/hello-world-docker-action@v1
|
||||||
with:
|
with:
|
||||||
who-to-greet: 'Mona the Octocat'
|
who-to-greet: 'Mona the Octocat'
|
||||||
|
|
|
@ -8,9 +8,7 @@ jobs:
|
||||||
image: code.forgejo.org/oci/node:22-bookworm
|
image: code.forgejo.org/oci/node:22-bookworm
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
image: "nginx:latest"
|
image: "code.forgejo.org/oci/apache-git:1"
|
||||||
ports:
|
|
||||||
- "8080:80"
|
|
||||||
steps:
|
steps:
|
||||||
- run: apt-get -qq update && apt-get -yqq install --no-install-recommends curl
|
- run: apt-get -qq update && apt-get -yqq install --no-install-recommends curl
|
||||||
- run: curl -v http://nginx:80
|
- run: curl -v http://nginx:80
|
||||||
|
|
2
act/runner/testdata/services/push.yaml
vendored
2
act/runner/testdata/services/push.yaml
vendored
|
@ -6,7 +6,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12
|
image: code.forgejo.org/oci/bitnami/postgresql:16
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: runner
|
POSTGRES_USER: runner
|
||||||
POSTGRES_PASSWORD: mysecretdbpass
|
POSTGRES_PASSWORD: mysecretdbpass
|
||||||
|
|
9
act/runner/testdata/uses-docker-url/push.yml
vendored
9
act/runner/testdata/uses-docker-url/push.yml
vendored
|
@ -5,19 +5,18 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: docker://node:16-buster-slim
|
- uses: docker://code.forgejo.org/oci/node:22
|
||||||
with:
|
with:
|
||||||
somekey: somevalue
|
somekey: somevalue
|
||||||
args: echo ${INPUT_SOMEKEY} | grep somevalue
|
args: echo ${INPUT_SOMEKEY} | grep somevalue
|
||||||
- uses: docker://node:16-buster-slim
|
- uses: docker://code.forgejo.org/oci/node:22
|
||||||
with:
|
with:
|
||||||
args: -v
|
args: -v
|
||||||
- uses: docker://node:16-buster-slim
|
- uses: docker://code.forgejo.org/oci/node:22
|
||||||
with:
|
with:
|
||||||
entrypoint: /bin/sh
|
entrypoint: /bin/sh
|
||||||
args: -c -- uname -a
|
args: -c -- uname -a
|
||||||
- uses: docker://node:16-buster-slim
|
- uses: docker://code.forgejo.org/oci/node:22
|
||||||
with:
|
with:
|
||||||
entrypoint: /bin/sh
|
entrypoint: /bin/sh
|
||||||
args: -c 'uname -a'
|
args: -c 'uname -a'
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,4 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://github.com/actions/hello-world-docker-action@b136eb8894c5cb1dd5807da824be97ccdf9b5423
|
- uses: https://code.forgejo.org/forgejo/hello-world-docker-action@4b60c28ca1d0868e9c6efc0d8274b32cba37717a
|
||||||
|
|
|
@ -4,4 +4,4 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://github.com/actions/hello-world-docker-action@b136eb8
|
- uses: https://code.forgejo.org/forgejo/hello-world-docker-action@4b60c28
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue