Skip to content

Commit

Permalink
ci: update workflows to use reusable repo
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 22, 2023
1 parent ff760dd commit cf8a72a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 41 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
name: Build

on:
release:
types: [published]
push:
tags:
- "*"
# Allow manual trigger
workflow_dispatch:

jobs:
extract-vars:
uses: hotosm/gh-workflows/.github/workflows/py_app_version.yml@main
with:
package_name: fmtm_splitter

backend-ci-build:
ci-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@main
needs: [extract-vars]
with:
build_target: prod
image_tags: |
"ghcr.io/hotosm/fmtm-splitter:${{ needs.extract-vars.outputs.app_version }}"
"ghcr.io/hotosm/fmtm-splitter:latest"
image_name: "ghcr.io/${{ github.repository }}"
build_args: |
PKG_VERSION=${{ needs.extract-vars.outputs.app_version }}
COMMIT_REF=${{ github.sha }}
9 changes: 1 addition & 8 deletions .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,11 @@ on:
workflow_dispatch:

jobs:
extract-vars:
uses: hotosm/gh-workflows/.github/workflows/py_app_version.yml@main
with:
package_name: fmtm_splitter

backend-ci-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@main
needs: [extract-vars]
with:
build_target: ci
image_tags: |
"ghcr.io/hotosm/fmtm-splitter:${{ needs.extract-vars.outputs.app_version }}-ci"
"ghcr.io/hotosm/fmtm-splitter:ci"
build_args: |
PKG_VERSION=${{ needs.extract-vars.outputs.app_version }}
COMMIT_REF=${{ github.sha }}
24 changes: 4 additions & 20 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,14 @@ on:
workflow_dispatch:

jobs:
get_cache_key:
runs-on: ubuntu-latest
outputs:
cache_key: ${{ steps.set_cache_key.outputs.cache_key }}
steps:
- name: Set cache key
id: set_cache_key
run: echo "cache_key=docs-build-$(date --utc +'%Y-%m-%d_%H:%M:%S')" >> $GITHUB_OUTPUT

build_doxygen:
uses: hotosm/gh-workflows/.github/workflows/doxygen_build.yml@main
needs: [get_cache_key]
with:
cache_paths: |
docs/apidocs
cache_key: ${{ needs.get_cache_key.outputs.cache_key }}
output_path: docs/apidocs

publish_docs:
uses: hotosm/gh-workflows/.github/workflows/mkdocs_build.yml@main
needs:
- get_cache_key
- build_doxygen
needs: [build_doxygen]
with:
image: ghcr.io/hotosm/fmtm-splitter:ci
cache_paths: |
docs/apidocs
cache_key: ${{ needs.get_cache_key.outputs.cache_key }}
image: ghcr.io/${{ github.repository }}:ci
doxygen: true

0 comments on commit cf8a72a

Please sign in to comment.