Skip to content

Merge pull request #2124 from spechub/2119_regularly_update_Hets_dock… #9

Merge pull request #2124 from spechub/2119_regularly_update_Hets_dock…

Merge pull request #2124 from spechub/2119_regularly_update_Hets_dock… #9

Workflow file for this run

# Build hets docker image
name: Docker
env:
HETS_LIB_REPO: https://github.com/spechub/Hets-lib.git
HETS_PPA: http://ppa.launchpad.net/hets/hets/ubuntu
on:
push:
branches:
- master
pull_request:
paths:
- 'Docker/**'
# NOTE: Can be triggered via WebUI, if this file is on the _default_ branch,
# only. However, triggering via Rest Api should work!
workflow_dispatch:
inputs:
tags:
description: 'Test image'
# Run this workflow for the latest commit in a branch, only. I.e. if there is
# any instance for an older commit still running, stop it and kill its jobs.
concurrency:
group: pr-docker-${{ github.head_ref }}
cancel-in-progress: true
jobs:
job_1:
# takes ~ ???
name: Publish docker image
# If a job doesn't get picked up for hours, the cause could be, that the
# specified platform is not supported anymore. In this case one will not get
# any hint, what's goin wrong - it just sits in the queue and wait for a
# runner forever (or until it gets kicked by a github cleanup job). See also
# https://github.com/actions/runner-images/issues/6002
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
runs-on: ubuntu-20.04
steps:
- name: Dump GitHub context
env:
GITHUB_CTX: ${{ toJSON(github) }}
MY_ENV: ${{ toJSON(env) }}
RUNNER_CTX: ${{ toJSON(runner) }}
run: |
printf "github:\n$GITHUB_CTX\n"
printf "env:\n$MY_ENV\n"
printf "env:\n$RUNNER_CTX\n"
df -h
printf "Tags: ${{ github.event.inputs.tags }}\n"
# NOTE: any file mutation in the steps that precede the build step will
# be ignored, including processing of the .dockerignore file since
# the context is based on the Git reference.
- name: Docker Buildx Setup
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:Docker"
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/hets:latest