Skip to content

Bump node from 22-alpine3.20 to 23-alpine3.20 #162

Bump node from 22-alpine3.20 to 23-alpine3.20

Bump node from 22-alpine3.20 to 23-alpine3.20 #162

Workflow file for this run

name: Docker
on:
push:
branches:
- main
pull_request:
env:
IMAGE_NAME: json
MAJOR_VERSION: 11
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
uses: docker/build-push-action@v6
with:
context: .
build-args: MAJOR_VERSION=${{ env.MAJOR_VERSION }}
load: true
tags: ${{ env.IMAGE_NAME }}
- name: Test
run: cat test.json | docker run -i --rm ${{ env.IMAGE_NAME }} -ag name value
push:
# Ensure test job passes before pushing image.
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: latest=true
images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}, ghcr.io/chorrell/${{ env.IMAGE_NAME }}
tags: ${{ env.MAJOR_VERSION }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
build-args: MAJOR_VERSION=${{ env.MAJOR_VERSION }}
push: true
provenance: mode=max
sbom: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}