Skip to content

Commit 0168d36

Browse files
authored
Build and attach acme.js to release (#55)
* 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
1 parent d827cd6 commit 0168d36

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/release.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Upload acme.js to release page
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
name: Build release artifact
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Build dist/acme.js
16+
run: make build
17+
18+
- name: Upload acme.js to release
19+
env:
20+
GH_TOKEN: ${{ github.token }}
21+
run: gh release upload "${{ github.event.release.tag_name }}" ./dist/acme.js

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,22 @@ NOTE: Some ACME providers have strict rate limits. Please consult with your prov
1515
## Installation
1616

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

2223
Each option above is detailed in each section below.
2324

25+
### Downloading the Latest Release
26+
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.
27+
28+
To integrate the downloaded `acme.js` file into a Docker image, you can add the following to your Dockerfile:
29+
```
30+
RUN mkdir -p /usr/lib/nginx/njs_modules/
31+
RUN curl -L -o /usr/lib/nginx/njs_modules/acme.js https://github.com/nginx/njs-acme/releases/download/v1.0.0/acme.js
32+
```
33+
2434
### Creating a Docker Image
2535
To create an Nginx+NJS+njs-acme Docker image, simply run:
2636
```

0 commit comments

Comments
 (0)