SDK v0.14.1 #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker image for new teeracle release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
main: | |
name: Push Integritee Teeracle to Dockerhub | |
runs-on: [ self-hosted ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download teeracle from release | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
version: "tags/${{ github.event.release.tag_name }}" | |
file: integritee-worker-teeracle-${{ github.event.release.tag_name }}.tar.gz | |
target: "integritee-worker-teeracle.tar.gz" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download teeracle cli from release | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
version: "tags/${{ github.event.release.tag_name }}" | |
file: teeracle-cli-${{ github.event.release.tag_name }}.tar.gz | |
target: "teeracle-cli.tar.gz" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Dockerhub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Load Worker & Push | |
env: | |
DOCKER_BUILDKIT: 1 | |
run: | | |
docker image load --input integritee-worker-teeracle.tar.gz | |
docker push integritee/teeracle:${{ github.event.release.tag_name }} | |
docker image load --input teeracle-cli.tar.gz | |
docker push integritee/teeracle-cli:${{ github.event.release.tag_name }} | |
docker images --all | |
- name: Delete images | |
run: | | |
if [[ "$(docker images -q integritee/teeracle:${{ github.event.release.tag_name }} 2> /dev/null)" != "" ]]; then | |
docker image rmi --force integritee/teeracle:${{ github.event.release.tag_name }} 2>/dev/null | |
fi | |
if [[ "$(docker images -q integritee/teeracle-cli:${{ github.event.release.tag_name }} 2> /dev/null)" != "" ]]; then | |
docker image rmi --force integritee/teeracle-cli:${{ github.event.release.tag_name }} 2>/dev/null | |
fi | |
docker images --all |