Skip to content

Publish Provider Package #25

Publish Provider Package

Publish Provider Package #25

Workflow file for this run

name: Publish Provider Package
on:
workflow_dispatch:
inputs:
cleanup-disks:
description: Whether or not run the cleanup disks step in the runner
type: boolean
default: true
required: false
version:
description: Version string to use while publishing the package (e.g. v1.0.0-alpha.1)
default: ""
required: false
jobs:
infer-go-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Read go version
id: read-go-version
run: echo "go-version=$(sed -n 's/^go //p' go.mod)" >> "$GITHUB_OUTPUT"
outputs:
go-version: ${{ steps.read-go-version.outputs.go-version }}
publish-provider-package:
needs: infer-go-version
uses: crossplane-contrib/provider-workflows/.github/workflows/publish-provider.yml@main
with:
cleanup-disk: ${{ inputs.cleanup-disks }}
go-version: ${{ needs.infer-go-version.outputs.go-version }}
repository: provider-mongodbatlas
version: ${{ github.event.inputs.version }}
secrets:
GHCR_PAT: ${{ secrets.GITHUB_TOKEN }}
XPKG_MIRROR_ACCESS_ID: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
XPKG_MIRROR_TOKEN: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
tag-latest:
needs: publish-provider-package
runs-on: ubuntu-latest
steps:
- name: Login to GHCR
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install crane
uses: imjasonh/setup-crane@6da1ae018866400525525ce74ff892880c099987 # v0.5
- name: Tag latest
run: crane tag ghcr.io/crossplane-contrib/provider-mongodbatlas:${{ inputs.version }} latest
add-extensions:
needs:
- infer-go-version
- publish-provider-package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- name: Login to Upbound Marketplace
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
with:
registry: xpkg.upbound.io
username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
- name: Append extensions
run: make xpkg.append VERSION=${{ inputs.version }}
env:
GO_REQUIRED_VERSION: ${{ needs.infer-go-version.outputs.go-version }}