Skip to content

Commit

Permalink
feat: publish sleavely/node-awscli:20.x and update latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleavely committed Oct 5, 2023
1 parent 11d531c commit bf7bf58
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/v18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
with:
pull: true
push: true
tags: ${{ github.workflow }},sleavely/node-awscli:latest
tags: ${{ github.workflow }}
28 changes: 28 additions & 0 deletions .github/workflows/v20.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: sleavely/node-awscli:20.x

on:
push:
branches:
- 'v20'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
pull: true
push: true
tags: ${{ github.workflow }},sleavely/node-awscli:latest
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:20

# zip
RUN apt-get update && apt-get install -y zip && rm -rf /var/lib/apt/lists/*
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ Lambda-compatible NodeJS images with AWS CLI installed.

## Automatic Updates

Whenever a new NodeJS version is released, an instance of [`commit-on-release`](https://github.com/Sleavely/commit-on-release) creates an empty commit in the corresponding branch (`v12` and `v14`, `v16`) so that a new image is published to Docker Hub by a Github Action workflow.
Whenever a new NodeJS version is released, an instance of [`commit-on-release`](https://github.com/Sleavely/commit-on-release) creates an empty commit in the corresponding branch (`v16` and `v18`, `v20`) so that a new image is published to Docker Hub by a Github Action workflow.

## Usage in CI/CD environments

Instead of using e.g. `node:14` and installing `awscli`, `jq`, and `zip` every time the pipeline runs, just switch out the name of the image to `sleavely/node-awscli:18.x` or [another appropriate version tag](https://hub.docker.com/r/sleavely/node-awscli/tags).
Instead of using e.g. `node:20` and installing `awscli`, `jq`, and `zip` every time the pipeline runs, just switch out the name of the image to `sleavely/node-awscli:20.x` or [another appropriate version tag](https://hub.docker.com/r/sleavely/node-awscli/tags).

### Bitbucket Pipelines

In `bitbucket-pipelines.yml`:

```yaml
image: sleavely/node-awscli:14.x
image: sleavely/node-awscli:20.x

pipelines:
default:
- step:
name: Deploy to test environment
script:
- npm install
- npm ci
- npm run build-app-test
- aws s3 sync ./build s3://$(WEBHOSTING_BUCKET_NAME)/
```
Expand All @@ -38,10 +38,10 @@ version: 2
jobs:
deploy:
docker:
- image: sleavely/node-awscli:14.x
- image: sleavely/node-awscli:20.x
steps:
- checkout
- run: npm install
- run: npm ci
- run: npm run build-app-test
- run: aws s3 sync ./build s3://$(WEBHOSTING_BUCKET_NAME)/
```
Expand All @@ -60,10 +60,10 @@ jobs:
deploy:
runs-on: ubuntu-latest
container:
image: sleavely/node-awscli:14.x
image: sleavely/node-awscli:20.x
steps:
- uses: actions/checkout@v2
- run: npm install
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build-app-test
- run: aws s3 sync ./build s3://$(WEBHOSTING_BUCKET_NAME)/
env:
Expand Down

0 comments on commit bf7bf58

Please sign in to comment.