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 1261111 commit 309516c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 41 deletions.
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: osm_rawdata

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/osm-rawdata:${{ needs.extract-vars.outputs.app_version }}-ci"
"ghcr.io/hotosm/osm-rawdata:ci"
build_args: |
PKG_VERSION=${{ needs.extract-vars.outputs.app_version }}
COMMIT_REF=${{ github.sha }}
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: osm_rawdata

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/osm-rawdata:${{ needs.extract-vars.outputs.app_version }}"
"ghcr.io/hotosm/osm-rawdata:latest"
image_name: "ghcr.io/${{ github.repository }}"
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/osm-rawdata: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 309516c

Please sign in to comment.