Skip to content

fix(ci): trying this... #19

fix(ci): trying this...

fix(ci): trying this... #19

name: Publish Latest Crossplane Composition
on:
push:
branches:
- main
jobs:
publish-crossplane-composition:
name: Build & Publish Crossplane Configuration Package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
logout: false
registry: ghcr.io
username: ${{ github.actor }}
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Install Crossplane CLI
run: |
curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh" | sh
sudo mv crossplane /usr/local/bin
crossplane version --client
- name: Build Crossplane Configuration package
run: |
echo "### Build Configuration .xpkg file"
crossplane xpkg build --package-file="package.xpkg" --package-root=. --examples-root="./example" --ignore=".github/workflows/*" --verbose
- name: Publish Configuration package to GHCR
run: |
echo "### Publish .xpkg to GHCR"
crossplane xpkg push --domain=oci://ghcr.io --package-files=package.xpkg ghcr.io/jacaudi/nextdns-crossplane-composition:latest --verbose