Skip to content

Commit

Permalink
Merge 322549a into 2949e32
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-magni authored Feb 8, 2023
2 parents 2949e32 + 322549a commit 2a97c4d
Show file tree
Hide file tree
Showing 107 changed files with 6,541 additions and 1,093 deletions.
81 changes: 0 additions & 81 deletions .github/workflows/azure-crossplane-mongodb-e2e.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy gh-pages
name: Build docs

on:
pull_request:
Expand All @@ -18,12 +18,12 @@ jobs:
fetch-depth: '0'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install Python requirements
run: pip install -r requirements.txt

- name: Deploy GitHub Pages
- name: Build documentation
run: mkdocs build
42 changes: 0 additions & 42 deletions .github/workflows/crossplane-main.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/crossplane-prepublish.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/crossplane-publish.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Deploy gh-pages
name: Publish docs

permissions:
pages: write
contents: write

on:
push:
Expand All @@ -18,12 +22,12 @@ jobs:
fetch-depth: '0'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install Python requirements
run: pip install -r requirements.txt

- name: Deploy GitHub Pages
- name: Build documentation and deploy GitHub Pages
run: mkdocs gh-deploy -b gh-pages
105 changes: 105 additions & 0 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Publish packages

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
packages: write
contents: write
pull-requests: write

on:
push:
branches:
- main
- develop
paths:
- 'packages/*/*/*/**'

pull_request:
types: [opened, ready_for_review, reopened, synchronize]
branches:
- main
paths:
- 'packages/*/*/*/**'

jobs:

list-packages:
uses: ./.github/workflows/reusable-list-packages.yml
with:
basedir: packages

bump-version:
needs:
- list-packages
if: needs.list-packages.outputs.crossplane_publish == 'true' || needs.list-packages.outputs.carvel_publish == 'true'
uses: ./.github/workflows/reusable-bump-version.yml

crossplane-publish:
needs:
- bump-version
- list-packages
if: needs.list-packages.outputs.crossplane_publish == 'true'
strategy:
matrix: ${{ fromJson(needs.list-packages.outputs.crossplane) }}
uses: ./.github/workflows/reusable-crossplane-publish.yml
with:
package_name: ${{ matrix.name }}
package_provider: ${{ matrix.provider }}
package_version: ${{ needs.bump-version.outputs.version }}
packages_basedir: ${{ needs.list-packages.outputs.basedir }}
package_path: ${{ matrix.path }}
run-test: ${{ github.event_name == 'pull_request' }}
secrets: inherit

carvel-publish-package:
needs:
- bump-version
- list-packages
if: needs.list-packages.outputs.carvel_publish == 'true'
strategy:
matrix: ${{ fromJson(needs.list-packages.outputs.carvel) }}
uses: ./.github/workflows/reusable-carvel-publish-package.yml
with:
package_name: ${{ matrix.name }}
package_provider: ${{ matrix.provider }}
package_version: ${{ needs.bump-version.outputs.version }}
packages_basedir: ${{ needs.list-packages.outputs.basedir }}
package_path: ${{ matrix.path }}

carvel-publish-repo:
if: needs.list-packages.outputs.carvel_publish == 'true'
uses: ./.github/workflows/reusable-carvel-publish-repo.yml
needs:
- list-packages
- bump-version
- carvel-publish-package
with:
packages_basedir: ${{ needs.list-packages.outputs.basedir }}
packages_list: ${{ needs.list-packages.outputs.carvel }}
package_version: ${{ needs.bump-version.outputs.version }}
repo_version: ${{ needs.bump-version.outputs.version }}
prepare_repo_pr: ${{ needs.bump-version.outputs.is_prerelease == 'false' }}
release: ${{ needs.bump-version.outputs.is_prerelease == 'true' }}

carvel-test:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reusable-carvel-test.yml
needs:
- list-packages
- bump-version
- carvel-publish-repo
strategy:
matrix: ${{ fromJson(needs.list-packages.outputs.carvel) }}
with:
repo_version: ${{ needs.bump-version.outputs.version }}
package_name: ${{ matrix.name }}
package_provider: ${{ matrix.provider }}
package_version: ${{ needs.bump-version.outputs.version }}
packages_basedir: ${{ needs.list-packages.outputs.basedir }}
package_path: ${{ matrix.path }}
pull_request_number: ${{ needs.carvel-publish-repo.outputs.pull_request_number}}
package_prerelease: ${{ needs.bump-version.outputs.is_prerelease }}
secrets: inherit
Loading

0 comments on commit 2a97c4d

Please sign in to comment.