Skip to content

Fix build-arg and tag #10

Fix build-arg and tag

Fix build-arg and tag #10

Workflow file for this run

name: Build Preview Images
on:
push:
branches: "preview-images"
#tags:
# - "*"
env:
IMAGE_NAME: "synadia/nats-server"
jobs:
# linux_2_10:
# #if: ${{ startsWith(github.ref_name, '2.10.') }}
# if: ${{ startsWith(github.ref_name, 'preview-images') }}
# runs-on: ubuntu-latest
#
# permissions:
# contents: read
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
#
# - name: Log into Docker
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_TOKEN }}
#
# # Setting up Docker Buildx with docker-container driver is required
# # at the moment to be able to use a subdirectory with Git context.
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
#
# - name: Setup builder
# run: |
# docker buildx create --name builder --bootstrap --use
#
# - name: alpine3.19
# run: |
# docker buildx build \
# --platform linux/arm64,linux/arm/v6,linux/arm/v7,linux/amd64,linux/386,linux/s390x \
# --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-alpine3.19" \
# --push \
# ./2.10.x/alpine3.19
#
# - name: scratch
# run: |
# docker buildx build \
# --build-arg "BASE_IMAGE=${{ env.IMAGE_NAME }}:${{ github.ref_name }}-alpine3.19" \
# --platform linux/arm64,linux/arm/v6,linux/arm/v7,linux/amd64,linux/386,linux/s390x \
# --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-scratch" \
# --push \
# ./2.10.x/scratch
#
windows_2_10:
#if: ${{ startsWith(github.ref_name, '2.10.') }}
if: ${{ startsWith(github.ref_name, 'preview-images') }}
runs-on: windows-2019
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log into Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: windowsservercore-1809
run: |
docker build `
--tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-windowsservercore-1809" `
./2.10.x/windowsservercore-1809
docker push "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-windowsservercore-1809"
- name: nanoserver-1809
run: |
docker build `
--build-arg "BASE_IMAGE=${{ env.IMAGE_NAME }}:${{ github.ref_name }}-windowsservercore-1809" `
--tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-nanoserver-1809" `
./2.10.x/nanoserver-1809
docker push "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-nanoserver-1809"