Merge pull request #11 from kubescape/dev #8
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: "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 GitHub Actions / ReleaseInvalid workflow file
|
||
- 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 |