Fix quotes in expression #2
Workflow file for this run
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
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: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: "{{defaultContext}}:2.10.x/alpine3.19" | |
push: true | |
tags: "$IMAGE_NAME:${{ github.ref_name }}-alpine3.19" | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: "{{defaultContext}}:2.10.x/scratch" | |
push: true | |
build-args: "BASE_IMAGE=$IMAGE_NAME:${{ github.ref_name }}-alpine3.19" | |
tags: "$IMAGE_NAME:${{ github.ref_name }}-scratch" |