Skip to content

Fix mustache workaround only taking top level keys into account #648

Fix mustache workaround only taking top level keys into account

Fix mustache workaround only taking top level keys into account #648

name: Create and publish k8s workbench container image
on:
push:
branches:
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "main"
env:
REGISTRY: ghcr.io
IMAGE_NAME: harbor-day2-operator
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
- uses: ricardochaves/python-lint@v1.4.0
with:
use-pylint: false
use-flake8: false
use-black: false
use-mypy: false
use-isort: false
extra-pycodestyle-options: --max-line-length=120
- name: Log in to the container registry
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for container
id: meta
uses: docker/metadata-action@8e1d5461f02b7886d3c1a774bfbd873650445aa2
with:
images: ${{ env.REGISTRY }}/steadforce/steadops/workbenches/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build container image for tests
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
with:
context: .
push: false
tags: ${{ env.IMAGE_NAME }}:test
- name: Test harbor tool
run: |
docker run --rm ${{ env.IMAGE_NAME }}:test /usr/local/harbor --help
- name: Tag and push tested container image
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}