Skip to content

Commit

Permalink
WIP: Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
samhh committed Jul 24, 2024
0 parents commit 699b0a0
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check

on:
push:

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- 0.8.0
- 0.8.3
steps:
- uses: actions/checkout@v4
- uses: ./
with:
version: ${{ matrix.version }}
- run: test "$(intlc --version)" = v${{ matrix.version }}
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.20

ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

RUN apk add --no-cache curl

COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Unsplash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# intlc-action

A GitHub Action providing CLI access to [intlc](https://github.com/unsplash/intlc). Currently supports only x86_64.

## Usage

Specify any version >=0.8.0:

```yml
steps:
- uses: unsplash/intlc-action@v1
with:
version: 0.8.3
- run: intlc --version
```
12 changes: 12 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Install intlc
description: Installs intlc to $PATH

inputs:
version:
required: true

runs:
using: docker
image: ./Dockerfile
args:
- ${{ inputs.version }}
16 changes: 16 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

set -e

VERSION="$1"
shift

curl -sL "https://github.com/unsplash/intlc/releases/download/v$VERSION/intlc-v$VERSION-linux-x86_64" -o /usr/local/bin/intlc
chmod +x /usr/local/bin/intlc

PATH="/usr/local/bin:$PATH"

/usr/local/bin/intlc --version
intlc --version

exec "$@"

0 comments on commit 699b0a0

Please sign in to comment.