Skip to content

Commit 2f9a6c6

Browse files
committed
Fix home dir issue
1 parent 9e7a420 commit 2f9a6c6

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ to Hex.pm automatically. This is most useful when you tag your repository.
88
1. First, create a key on your [Hex.pm dashboard](https://hex.pm/dashboard/keys). Make sure to give it write
99
permissions.
1010

11-
2. Next, use this GitHub Action in your workflow:
11+
2. Next, add the key from step 1 to your GitHub repository’s secrets. Call it `HEX_API_KEY`.
12+
13+
3. Finally, use this GitHub Action in your workflow:
1214

1315
```yaml
1416
on:
1517
push:
1618
tags:
1719
- '*'
18-
uses: erlangpack/github-action@v1
19-
with:
20-
hex-api-key: ${{ secrets.HEX_API_KEY }}
20+
jobs:
21+
publish:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: erlangpack/github-action@v1
25+
env:
26+
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
2127
```
22-
23-
## Inputs
24-
25-
### `hex-api-key`
26-
27-
**Required** Your Hex API with write permissions. Make sure never to expose this key, so add it as a secret.

action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: 'Publish to Hex'
2-
description: 'Publish your repository’s Git tags as releases on Hex.pm'
3-
inputs:
4-
hex-api-key:
5-
description: 'Your Hex API key that has write permissions to your package'
6-
required: true
2+
description: 'Automate publishing packages on Hex.pm'
73
runs:
84
using: 'docker'
95
image: 'Dockerfile'

entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh -l
22

3-
env HEX_API_KEY=$INPUT_HEX_API_KEY rebar3 hex publish -r hexpm --yes
3+
# This is necessary because GitHub changes the home dir to /github/home when the action is started; Rebar doesn't seem
4+
# to respect the REBAR_GLOBAL_CONFIG_DIR env var.
5+
ln -s /rebar3/.config ~/.config
6+
7+
rebar3 hex publish -r hexpm --yes

0 commit comments

Comments
 (0)