Skip to content

Commit

Permalink
ci: push chart updates in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
totycro committed Dec 12, 2024
1 parent 729397a commit aa9dea3
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- "*"
branches:
- helm-chart # for testing now

jobs:
build_and_push:
Expand All @@ -25,21 +27,29 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
load: true
tags: |
eurodatacube/pygeoapi-eoxhub:${{ steps.get_image_tag.outputs.TAG }}
# - name: Build
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# load: true
# tags: |
# eurodatacube/pygeoapi-eoxhub:${{ steps.get_image_tag.outputs.TAG }}

- name: "Git checkout"
uses: actions/checkout@v2

- name: test and push
#- name: test and push
# run: |
# IMG="eurodatacube/pygeoapi-eoxhub:${{ steps.get_image_tag.outputs.TAG }}"
# docker run --env PYGEOAPI_CONFIG=/pkp/tests/pygeoapi-test-config.yaml --env PYGEOAPI_OPENAPI=/pygeoapi/tests/pygeoapi-test-openapi.yml --entrypoint python3 "${IMG}" -m pytest || exit 1
# docker run --entrypoint flake8 "${IMG}" pygeoapi_kubernetes_papermill tests || exit 1
# docker run --entrypoint mypy "${IMG}" pygeoapi_kubernetes_papermill tests || exit 1
# docker push "${IMG}"

- name: Install Helm
uses: azure/[email protected]

- name: Publish Helm chart
run: |
IMG="eurodatacube/pygeoapi-eoxhub:${{ steps.get_image_tag.outputs.TAG }}"
docker run --env PYGEOAPI_CONFIG=/pkp/tests/pygeoapi-test-config.yaml --env PYGEOAPI_OPENAPI=/pygeoapi/tests/pygeoapi-test-openapi.yml --entrypoint python3 "${IMG}" -m pytest || exit 1
docker run --entrypoint flake8 "${IMG}" pygeoapi_kubernetes_papermill tests || exit 1
docker run --entrypoint mypy "${IMG}" pygeoapi_kubernetes_papermill tests || exit 1
docker push "${IMG}"
helm package pygeoapi-eoxhub
curl --user "${{ secrets.CHARTMUSEUM_USERNAME }}:${{ secrets.CHARTMUSEUM_PASSWORD }}" --data-binary "@pygeoapi-eoxhub-${{ steps.get_image_tag.outputs.TAG }}.tgz" https://charts-public.hub.eox.at/api/charts

0 comments on commit aa9dea3

Please sign in to comment.