mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-22 06:45:03 +01:00
fix: step container workdir and mounts (#93)
* fix: step container workdir and mounts * avoid perm issues and do not mount tool_cache
This commit is contained in:
13
pkg/runner/testdata/docker-action-host-env/action/Dockerfile
vendored
Normal file
13
pkg/runner/testdata/docker-action-host-env/action/Dockerfile
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
&& apt-get clean
|
||||
|
||||
# Copy the entrypoint script
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Set the entrypoint
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
12
pkg/runner/testdata/docker-action-host-env/action/action.yml
vendored
Normal file
12
pkg/runner/testdata/docker-action-host-env/action/action.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
name: "Hello World Docker Action"
|
||||
description: "A simple Docker action that prints Hello, World! and environment variables."
|
||||
inputs:
|
||||
who-to-greet:
|
||||
description: "Who to greet"
|
||||
required: false
|
||||
default: "World"
|
||||
runs:
|
||||
using: "docker"
|
||||
image: "Dockerfile"
|
||||
args:
|
||||
- ${{ inputs.who-to-greet }}
|
||||
18
pkg/runner/testdata/docker-action-host-env/action/entrypoint.sh
vendored
Normal file
18
pkg/runner/testdata/docker-action-host-env/action/entrypoint.sh
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Print a greeting
|
||||
echo "Hello, $1!"
|
||||
|
||||
# Print all environment variables
|
||||
echo "Environment Variables:"
|
||||
env
|
||||
|
||||
ls -la "$PWD"
|
||||
ls -la "$PWD/docker-action-host-env"
|
||||
|
||||
if [ -f "$PWD/docker-action-host-env/Dockerfile" ]; then
|
||||
echo "Dockerfile exists in workspace."
|
||||
else
|
||||
echo "Dockerfile does not exist in workspace."
|
||||
fi
|
||||
15
pkg/runner/testdata/docker-action-host-env/push.yml
vendored
Normal file
15
pkg/runner/testdata/docker-action-host-env/push.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Hello World Docker Action Workflow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
hello_world_job:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run Hello World Docker Action
|
||||
uses: ./docker-action-host-env/action
|
||||
with:
|
||||
who-to-greet: "GitHub"
|
||||
@@ -1,4 +1,4 @@
|
||||
name: uses-docker-url
|
||||
name: uses-nested-composite
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
|
||||
Reference in New Issue
Block a user