Skip to content

Merge pull request #11 from kubescape/dev #8

Merge pull request #11 from kubescape/dev

Merge pull request #11 from kubescape/dev #8

Workflow file for this run

name: "Release"
on:
push:
branches-ignore:
- "**"
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
image-name: ${{ steps.image-name.outputs.IMAGE_NAME }}
image-version: ${{ steps.image-version.outputs.IMAGE_VERSION }}
steps:
- name: Checkout repository
id: checkout-repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: set-up-buildx
uses: docker/setup-buildx-action@v2
- name: Set image version
id: image-version
run:
- git fetch --tags

Check failure on line 28 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 28, Col: 9): A sequence was not expected

Check failure on line 28 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 28, Col: 9): A sequence was not expected
- echo 'IMAGE_VERSION=$(git describe --tags --always --abbrev=0)' >> $GITHUB_OUTPUT
- name: Set image name
id: image-name
run: echo 'IMAGE_NAME=quay.io/${{ github.repository_owner }}/kubeenforcer' >> $GITHUB_OUTPUT
- name: Set up QEMU
id: set-up-qemu
uses: docker/setup-qemu-action@v2
- name: Login to Quay.io
id: login-to-quay
env:
QUAY_PASSWORD: ${{ secrets.QUAYIO_REGISTRY_PASSWORD }}
QUAY_USERNAME: ${{ secrets.QUAYIO_REGISTRY_USERNAME }}
run: docker login -u="${QUAY_USERNAME}" -p="${QUAY_PASSWORD}" quay.io
- name: Build and push Docker image
run: docker buildx build . --file ./Dockerfile --tag ${{ steps.image-name.outputs.IMAGE_NAME }}:${{ steps.image-version.outputs.IMAGE_VERSION }} --tag ${{ steps.image-name.outputs.IMAGE_NAME }}:latest --build-arg image_version=${{ steps.image-version.outputs.IMAGE_VERSION }} --build-arg client=image-release --push --platform linux/amd64,linux/arm64