Skip to content

update project structure #2

update project structure

update project structure #2

Workflow file for this run

name: CD
on:
push:
branches:
- main
tags:
- '*/v*.*.*'
jobs:
publish:
strategy:
matrix:
image: [ plural-cli, plural-bundle, trust-manager-bundle ]
name: Build and push ${{ matrix.image }} image
if: startsWith(github.ref, format('refs/tags/{0}', matrix.image)) || github.ref == 'refs/heads/main'

Check failure on line 14 in .github/workflows/cd.yaml

View workflow run for this annotation

GitHub Actions / CD

Invalid workflow file

The workflow is not valid. .github/workflows/cd.yaml (Line: 14, Col: 9): Unrecognized named-value: 'matrix'. Located at position 48 within expression: startsWith(github.ref, format('refs/tags/{0}', matrix.image)) || github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
permissions:
contents: 'read'
id-token: 'write'
packages: 'write'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/pluralsh/kairos-${{matrix.image}}
docker.io/pluralsh/kairos-${{matrix.image}}
tags: |
type=sha
type=match,pattern=${{matrix.image}}/v(.*),group=1
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker
uses: docker/login-action@v3
with:
username: mjgpluralsh
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "images/${{matrix.image}}/."
file: "images/${{matrix.image}}/Dockerfile"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
GIT_COMMIT=${{ github.sha }}