From 52a79294113ab9cdfdecb2d684bb53e547348c27 Mon Sep 17 00:00:00 2001 From: Petu Eusebiu Date: Tue, 25 May 2021 13:06:24 +0300 Subject: [PATCH] ci/cd: build and push zot container images to github's container registry, closes #188 --- .github/workflows/publish-docker-image.yml | 24 ++++++++++++++++++++++ .travis.yml | 10 +++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/publish-docker-image.yml diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml new file mode 100644 index 00000000..74b874b7 --- /dev/null +++ b/.github/workflows/publish-docker-image.yml @@ -0,0 +1,24 @@ +name: Publish Docker image +on: + release: + types: [published] +jobs: + push_to_registry: + name: Push Docker image to GitHub Packages + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Log in to GitHub Docker Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build container image + uses: docker/build-push-action@v2 + with: + push: true + tags: | + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} diff --git a/.travis.yml b/.travis.yml index 005e43fc..596fb2a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,16 @@ install: script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then travis_wait 60 make; fi +deploy: + skip_cleanup: true + provider: releases + api_key: + secure: "DlCyRM85KiUN6p9BvmBjf7gtSHfjbuiJhjIOP19drQfIwxDNvgdQXOV8zSOIS2g8bQK8LOUkUWbVlxRkA5RBVfNb1v8MUaRhByOJ8zl8JMSLs4XcUvcLFENp7Au/6HCWMrPg170f3NvoaJFBCyVFh8nYRys7PcRenRafnvEapTLA6gNMaS6T4PIenwwu/FFfE+jAmW3PHDx+Ln0sgmTpyV+/8MyJrS0X39HUeM9HgX5C0ErUMptlb4LIrN5feGeHSE9agOKT7yIGoa4UzXpm0WaYIhg291S417l8uCS8uCa4j2D7EUJJmYTKi7I56hCJmMqBWttHrQhSRLfe6PKiBEw+ieR8lhcv/B5MMuWO04oypRko1/iDub8rYclzcty7WMqWDp+Fl0wT7SIy9fHL9kE8moIItTQDVxRUV3YaLx2pxD4o8OHea8FFnH/I6AMZkikw0Gk1bZlUmYsH0vFghs45rY71tMoVLgk9WAqeIbcgTgq1XEtdokY+PbnZ01EdlQKLj4LA8Wf1KfCqId4EDycgSF/3TAcWiuPr7cJFV9zgyOI4dzr1lRkLJi9huK4MmTbA5NYsA6Ci/Ca1+1hAUfDwcbSjRTeM4s4sCQnxihzQo66Ba0F18kFGVadkrnh/g1DnsW6NeTyfuukU4JvDg4/4Cyqa0IoG2rdERWgo4Es=" + file_glob: true + file: bin/zot* + on: + tags: true + after_success: - bash <(curl -s https://codecov.io/bash)