Skip to content

Commit

Permalink
Build and attach acme.js to release (#55)
Browse files Browse the repository at this point in the history
* Github action that runs when a release is created that builds acme.js and attaches it to the release.

* add instructions for downloading release

* simplify with gh command line; thanks @ryepup!

* README.md refinements
  • Loading branch information
zsteinkamp authored Mar 29, 2024
1 parent d827cd6 commit 0168d36
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Upload acme.js to release page

on:
release:
types: [created]

jobs:
build:
name: Build release artifact
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build dist/acme.js
run: make build

- name: Upload acme.js to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${{ github.event.release.tag_name }}" ./dist/acme.js
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,22 @@ NOTE: Some ACME providers have strict rate limits. Please consult with your prov
## Installation

There are a few ways of using this repo. You can:
* download `acme.js` from the latest [Release](https://github.com/nginx/njs-acme/releases)
* build an ACME-enabled Docker image to replace your existing NGINX image
* use Docker to build the `acme.js` file to use with your NGINX installation
* build `acme.js` using a locally installed Node.js toolkit to use with your NGINX installation

Each option above is detailed in each section below.

### Downloading the Latest Release
You can download the latest released `acme.js` file from the [Releases](https://github.com/nginx/njs-acme/releases) page. Typically you would place this in the path `/usr/lib/nginx/njs_modules/acme.js` in your NGINX server. See the example [nginx.conf](examples/nginx.conf) to see how to integrate it into your NGINX configuration.

To integrate the downloaded `acme.js` file into a Docker image, you can add the following to your Dockerfile:
```
RUN mkdir -p /usr/lib/nginx/njs_modules/
RUN curl -L -o /usr/lib/nginx/njs_modules/acme.js https://github.com/nginx/njs-acme/releases/download/v1.0.0/acme.js
```

### Creating a Docker Image
To create an Nginx+NJS+njs-acme Docker image, simply run:
```
Expand Down

0 comments on commit 0168d36

Please sign in to comment.