Bumped docker base image to node 20.18 #423
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
name: Manage Release | |
jobs: | |
release_please: | |
name: Create or prepare release | |
runs-on: ubuntu-latest | |
outputs: | |
major: ${{ steps.release.outputs.major }} | |
minor: ${{ steps.release.outputs.minor }} | |
patch: ${{ steps.release.outputs.patch }} | |
release_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
release-type: node | |
# The logic below handles the npm publication: | |
- uses: actions/checkout@v4 | |
# these if statements ensure that a publication only occurs when | |
# a new release is created: | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org' | |
if: ${{ steps.release.outputs.release_created }} | |
- run: npm install | |
if: ${{ steps.release.outputs.release_created }} | |
publish_docker: | |
name: Publish Tagged Docker Image | |
runs-on: ubuntu-latest | |
needs: release_please | |
if: ${{needs.release_please.outputs.release_created}} | |
steps: | |
- run: echo version v${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}} | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: 'arm64,arm' | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/arm64,linux/amd64,linux/arm/v7 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
platforms: ${{ steps.buildx.outputs.platforms }} | |
push: true | |
tags: | | |
${{ github.repository }}:v${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}} | |
${{ github.repository }}:v${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}} | |
${{ github.repository }}:v${{needs.release_please.outputs.major}} |