-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2124 from spechub/2119_regularly_update_Hets_dock…
…er_image add CI job for docker publishing
- Loading branch information
Showing
2 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# 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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM ubuntu:18.04 | ||
FROM ubuntu:20.04 | ||
|
||
ENV LANG C.UTF-8 | ||
|
||
|