Skip to content

new items

new items #126

name: Build and Push Docker Image
on: [push, workflow_dispatch]
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate THE Version
id: generate_version
run: echo "VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV
- name: THE Version
run: echo "$VERSION"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install crossplane cli
run: "[ -f crossplane ] || curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
shell: bash
- name: Add crossplane to PATH
run: echo "$PWD" >> $GITHUB_PATH
- name: Build xpkg
run: crossplane xpkg build -o catalog-items.xpkg
working-directory: package
- name: Push xpkg
run: crossplane xpkg push -f catalog-items.xpkg ${{ vars.REGISTRY_URL }}/platformplane/platform-catalog:$VERSION
working-directory: package