Skip to content

Commit

Permalink
chore: test baseimage docker after build by building SK release docke…
Browse files Browse the repository at this point in the history
…r image without pushing it to registry (#1696)
  • Loading branch information
KEGustafsson authored Mar 17, 2024
1 parent 751bcfd commit 816e457
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/build-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,56 @@ jobs:
steps:
- name: Checkout
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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: signalkci
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }} # Personal access tokens (classic) with a scope of "write:packages" is needed to release ghcr.io package registry.
- name: Build and push

- name: Build baseimages and push with test tag
uses: docker/build-push-action@v5
with:
file: ./docker/Dockerfile_base
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
signalk/signalk-server-base:test
ghcr.io/signalk/signalk-server-base:test
- name: Modify Dockerfile_rel for testing
run: |
sed -i 's/:latest/:test/g' ./docker/Dockerfile_rel
- name: Build Signal K test dockers
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile_rel
platforms: linux/amd64,linux/arm/v7,linux/arm64
build-args: |
TAG=latest
- name: Push baseimages to registries with latest tag
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile_base
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
signalk/signalk-server-base:latest
ghcr.io/signalk/signalk-server-base:latest
ghcr.io/signalk/signalk-server-base:latest

0 comments on commit 816e457

Please sign in to comment.