Add Support for HPA Object (#28) #16
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: kube-nimble CI | |
on: | |
push: | |
tags: | |
- 'v0.*' | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ghcr.io/ivaltryek/kube-nimble | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set env vars | |
run: | | |
echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
echo "DATE=$(date --rfc-3339=seconds)" >> $GITHUB_ENV | |
echo "REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: latest | |
- name: Available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} && docker version | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: true | |
tags: "${{env.IMAGE_NAME}}:${{env.TAG_NAME}}, ${{env.IMAGE_NAME}}:latest" | |
labels: | | |
org.opencontainers.image.licenses=Apache | |
org.opencontainers.image.created=${{env.DATE}} | |
org.opencontainers.image.revision=${{env.REVISION}} | |
org.opencontainers.image.source=https://github.com/ivaltryek/kube-nimble | |
org.opencontainers.image.title=kube-nimble | |
org.opencontainers.image.version=${{env.TAG_NAME}} | |
annotations: | | |
org.opencontainers.image.description=Rust based Kubernetes Operator to deploy K8s objects minimally. | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: cargo build | |
run: | | |
cargo build --release --all-features | |
- name: generate CRD spec | |
run: | | |
mkdir -p crdspec | |
chmod +x target/release/crdgen | |
target/release/crdgen > crdspec/nimble.ivaltryek.github.com.yaml | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: crdspec/* | |
draft: true | |
fail_on_unmatched_files: true | |