Skip to content

Commit bc7ae51

Browse files
committed
Test
Signed-off-by: Peter Solymos <[email protected]>
1 parent 92bc6d4 commit bc7ae51

File tree

5 files changed

+50
-4
lines changed

5 files changed

+50
-4
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,24 @@
22
GitHub Actions
33

44
`docker pull ghcr.io/analythium/actions:latest`
5+
6+
Example:
7+
8+
```yaml
9+
on:
10+
push:
11+
branches:
12+
- main
13+
14+
name: test
15+
16+
jobs:
17+
check-r2u:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v3
22+
23+
- name: Check
24+
uses: analythium/[email protected]
25+
```

entrypoint.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,5 @@
44
# $ git add entrypoint.sh
55
# $ git update-index --chmod=+x entrypoint.sh
66

7-
echo "Hello $1"
8-
time=$(date)
9-
echo "time=$time" >> $GITHUB_OUTPUT
10-
117
deps-cli all
128
Rscript -e 'devtools::check()'

test/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM ghcr.io/analythium/actions:latest
2+
COPY entrypoint.sh /entrypoint.sh
3+
ENTRYPOINT ["/entrypoint.sh"]

test/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Analythium Actions: R CMD check TEST'
2+
description: 'Check an R package'
3+
author: 'Analythium'
4+
inputs:
5+
who-to-greet: # id of input
6+
description: 'Who to greet'
7+
required: true
8+
default: 'World'
9+
outputs:
10+
time: # id of output
11+
description: 'The time we greeted you'
12+
runs:
13+
using: 'docker'
14+
image: 'Dockerfile'
15+
args:
16+
- ${{ inputs.who-to-greet }}

test/entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh -l
2+
3+
# Dont forget <https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action>
4+
# $ git add entrypoint.sh
5+
# $ git update-index --chmod=+x entrypoint.sh
6+
7+
echo "THIS IS USING THE TEST DIR"
8+
9+
deps-cli all
10+
Rscript -e 'devtools::check()'

0 commit comments

Comments
 (0)