Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LocMapper action #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions locmapper/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This Dockerfile is used to create a proxy for Github actions.
FROM happn/locmapper
26 changes: 26 additions & 0 deletions locmapper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# LocMapper action

## Basic usage

```yaml
name: LocMapper
on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: happn-tech/actions/locmapper@master
with:
command: 'lint'
```

## Inputs

| Name | Type | Description | Default | Required |
| ------------------ | ---------------- | ----------------------------------------------------------------------------- | -------- | -------- |
| command | string | Default command | | - |
11 changes: 11 additions & 0 deletions locmapper/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'LocMapper'
description: GitHub Action for using
inputs:
command:
description: 'Default input command'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.command }}
Copy link

@DevHugo DevHugo Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ags are passed on entrypoints.sh argument. See the docs: https://github.com/happn-tech/LocMapper/blob/main/Dockerfile#L49 .

I think it needed to create an entrypoint.sh file. Somethink like in the Dockerfile :

USER root

ADD entrypoint.sh .

RUN chmod +x entrypoint.sh && chown locmapper entrypoint.sh

ENTRYPOINT ["/locmapper/entrypoint.sh"]

and entrypoint.sh :

#!/bin/sh

locmapper $1