Skip to content

Commit 5b630f9

Browse files
author
Faruk D.
committed
update python, use entrypoint.sh
1 parent 4c11146 commit 5b630f9

File tree

5 files changed

+33
-15
lines changed

5 files changed

+33
-15
lines changed

.github/workflows/selftest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
name: "selftest"
1111
runs-on: ubuntu-latest
1212
steps:
13-
1413
- name: Check out a copy of the repository
1514
uses: actions/checkout@v3
1615

@@ -20,3 +19,4 @@ jobs:
2019
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
2120
with:
2221
MY_REPO_URL: "https://github.com/${{ github.repository }}"
22+
branch: main

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
FROM python:3.9-alpine
1+
FROM python:3.12-alpine
22

33
RUN apk update && apk add --no-cache build-base
44

55
WORKDIR /data
66

7-
RUN python3 -m venv venv && \
8-
source venv/bin/activate && \
9-
pip install --upgrade pip wheel && \
10-
pip install howfairis
7+
RUN python3 -m pip install --upgrade pip wheel && \
8+
python3 -m pip install howfairis
119

12-
ENV PATH=/data/venv/bin:${PATH}
10+
COPY entrypoint.sh /entrypoint.sh
11+
RUN chmod +x /entrypoint.py
1312

14-
ENTRYPOINT ["howfairis"]
13+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
To enable this checker, add the following snippet as ``.github/workflows/fair-software.yml`` in your GitHub repository.
77

88
```yaml
9-
name: fair-software
9+
name: howfairis
1010

1111
on: push
1212

@@ -18,9 +18,11 @@ jobs:
1818
- uses: fair-software/howfairis-github-action@0.2.1
1919
name: Measure compliance with fair-software.eu recommendations
2020
env:
21-
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
21+
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
2222
with:
2323
MY_REPO_URL: "https://github.com/${{ github.repository }}"
24+
branch: main
25+
json: false
2426
```
2527
2628
## FAIR badges explained

action.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
---
2+
name: howfairis
3+
description: "Analyze compliance with fair-software.eu recommendations"
24
author: "https://github.com/fair-software"
35
branding:
46
color: purple
57
icon: check
6-
description: "Analyze compliance with fair-software.eu recommendations"
78
inputs:
89
MY_REPO_URL:
910
description: "URL of the GitHub repository for which to run the analysis"
1011
required: true
11-
name: fair-software
12+
branch:
13+
description: Which git branch to use. Also accepts other git references like SHA or tag.
14+
required: false
15+
default: 'main'
16+
json:
17+
description: Whether to display the collected results JSON.
18+
required: false
19+
default: 'false'
1220
runs:
13-
args:
14-
- "${{ inputs.MY_REPO_URL }}"
15-
entrypoint: howfairis
1621
image: Dockerfile
1722
using: docker
23+
args:
24+
- "${{ inputs.MY_REPO_URL }}"
25+
- "${{ inputs.branch }}"
26+
- "${{ inputs.json }}"

entrypoint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
howfairis \
6+
--branch ${INPUT_BRANCH-main} \
7+
${INPUT_MY_REPO_URL}
8+
# --json-output${INPUT_JSON} \

0 commit comments

Comments
 (0)