Skip to content

Debug ci

Debug ci #104

name: Build and push
on:
push:
tags:
- "*"
branches:
- helm-chart # for testing now
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Get the tag
id: get_image_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
# NOTE: this step is necessary because otherwise the build-push-action can't push /o\
# https://github.com/docker/build-push-action/issues/100#issuecomment-715352826
- uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
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: "Git checkout"
uses: actions/checkout@v2
#- 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: |
helm package pygeoapi-eoxhub
HELM_PACKAGE="pygeoapi-eoxhub-${{ steps.get_image_tag.outputs.TAG }}.tgz"
echo "Uploading $HELM_PACKAGE"
curl --user "${{ secrets.CHARTMUSEUM_USERNAME }}:${{ secrets.CHARTMUSEUM_PASSWORD }}" --data-binary "@${HELM_PACKAGE}" steps.get_image_tag.outputs.TAG }}.tgz" https://charts-public.hub.eox.at/api/charts