Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate generation of Docker images and testing via GitHub actions #44

Open
wants to merge 117 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
c9b016e
added initial docker github action
lobis Mar 8, 2022
7a37721
commented dockerhub auth
lobis Mar 8, 2022
6514e22
added label
lobis Mar 8, 2022
48d1f14
fix action env variable
lobis Mar 8, 2022
451d8bb
moved env to job level
lobis Mar 8, 2022
d23bfeb
updated action to define image name
lobis Mar 8, 2022
de79a67
fix typo in action
lobis Mar 8, 2022
696a6a9
updated action env according to https://docs.github.com/en/actions/us…
lobis Mar 8, 2022
f716c82
attempt to fix action env problem
lobis Mar 8, 2022
9048b41
using github context instead of env
lobis Mar 8, 2022
07b63bd
attempt to simplify action
lobis Mar 8, 2022
bc8a3de
added UBUNTU_VERSION arg to image, matrix build in action
lobis Mar 8, 2022
0b8e407
attempt to add latest tag
lobis Mar 8, 2022
2a99b7a
added missing ghcr.io/
lobis Mar 8, 2022
c13c726
attempt to simplify
lobis Mar 8, 2022
b682c95
reverted previous commit
lobis Mar 8, 2022
5e5d99a
formatting
lobis Mar 8, 2022
5db9d98
addding label from action
lobis Mar 8, 2022
bbba774
fixed package label
lobis Mar 8, 2022
6661ace
added fedora workflow
lobis Mar 8, 2022
e307ed9
added test for fedora
lobis Mar 8, 2022
fea378c
trying to fix multiple tags
lobis Mar 8, 2022
d79ab10
divided workflow
lobis Mar 8, 2022
0f99b78
changed titles
lobis Mar 8, 2022
0a9b59a
updated workflows
lobis Mar 8, 2022
3fa471c
changed action name, fixed typo
lobis Mar 8, 2022
64f83d9
fixed name change
lobis Mar 8, 2022
636f14d
added ubuntu from source image
lobis Mar 9, 2022
7c65da5
shortened action names
lobis Mar 9, 2022
b820685
added git package
lobis Mar 9, 2022
72c6709
added centOS image, moved env variables in Dockerfiles
lobis Mar 9, 2022
abb8ea1
removed from all trigger
lobis Mar 9, 2022
9df080d
fixed inconsistent name
lobis Mar 9, 2022
7371b36
Update Dockerfile
lobis Mar 9, 2022
269ca2f
removed c++11 std from centos
lobis Mar 9, 2022
052db88
removed testing from centos image
lobis Mar 9, 2022
0dbffd8
Merge branch 'root-project:master' into master
lobis Mar 19, 2022
9a1d152
Merge remote-tracking branch 'upstream/master'
lobis May 17, 2022
14d11dd
updated ubuntu (no source) action to build only latest with simpler l…
lobis May 17, 2022
973b938
updated Ubuntu from source action to accept Major.Minor.Patch version…
lobis May 17, 2022
389a6fa
Updated fedora action, added test to Ubuntu action, removed CentOS fr…
lobis May 17, 2022
d2ea278
fix typo in action
lobis May 17, 2022
1dbcc6a
updated prompt style
lobis May 17, 2022
3c88f45
Added actions for arch, centos, conda, gentoo
lobis May 17, 2022
8e2f1aa
Normalized action name for Ubuntu
lobis May 17, 2022
dce0c34
Removed small formatting chagnes on Dockerfiles
lobis May 17, 2022
53e19d0
testing root version as tag
lobis May 17, 2022
d30580f
debugging action
lobis May 17, 2022
c6dcd1a
fix typo
lobis May 17, 2022
57998e7
fix action
lobis May 17, 2022
5cafda2
Added fedora version to tag
lobis May 17, 2022
5e361e1
removed `"` from OS version
lobis May 17, 2022
4c71602
fix error in action
lobis May 17, 2022
d94ed3f
updated action for fedora and ubuntu
lobis May 17, 2022
f96f76f
Added root version tag to images
lobis May 17, 2022
b9b2dcf
fix tag not pushing
lobis May 17, 2022
a5d91d8
updated image version tag
lobis May 17, 2022
42df16b
Added trigger when relevant files are updated
lobis May 17, 2022
255309e
Update README.md
eguiraud May 19, 2022
43d7e70
added initial docker github action
lobis Mar 8, 2022
402bcf6
commented dockerhub auth
lobis Mar 8, 2022
1571a73
added label
lobis Mar 8, 2022
98838e5
fix action env variable
lobis Mar 8, 2022
0adb8fb
moved env to job level
lobis Mar 8, 2022
f29ef7f
updated action to define image name
lobis Mar 8, 2022
acde3ff
fix typo in action
lobis Mar 8, 2022
9053970
updated action env according to https://docs.github.com/en/actions/us…
lobis Mar 8, 2022
37ab35e
attempt to fix action env problem
lobis Mar 8, 2022
d1f4fc8
using github context instead of env
lobis Mar 8, 2022
bfa31c2
attempt to simplify action
lobis Mar 8, 2022
afe7fb9
added UBUNTU_VERSION arg to image, matrix build in action
lobis Mar 8, 2022
23778be
attempt to add latest tag
lobis Mar 8, 2022
3157319
added missing ghcr.io/
lobis Mar 8, 2022
c9b2832
attempt to simplify
lobis Mar 8, 2022
ef82861
reverted previous commit
lobis Mar 8, 2022
3d4f540
formatting
lobis Mar 8, 2022
e873009
addding label from action
lobis Mar 8, 2022
ca3487d
fixed package label
lobis Mar 8, 2022
fa8b7dd
added fedora workflow
lobis Mar 8, 2022
128d3de
added test for fedora
lobis Mar 8, 2022
ef24f4a
trying to fix multiple tags
lobis Mar 8, 2022
768c30b
divided workflow
lobis Mar 8, 2022
92342ea
changed titles
lobis Mar 8, 2022
4970147
updated workflows
lobis Mar 8, 2022
c07dcc1
changed action name, fixed typo
lobis Mar 8, 2022
36bb738
fixed name change
lobis Mar 8, 2022
92c2fe2
added ubuntu from source image
lobis Mar 9, 2022
791eca5
shortened action names
lobis Mar 9, 2022
15b1e66
added centOS image, moved env variables in Dockerfiles
lobis Mar 9, 2022
0ee0fef
removed from all trigger
lobis Mar 9, 2022
b59a4f1
fixed inconsistent name
lobis Mar 9, 2022
52170e2
Update Dockerfile
lobis Mar 9, 2022
10338ab
removed c++11 std from centos
lobis Mar 9, 2022
2893564
removed testing from centos image
lobis Mar 9, 2022
70532b9
updated ubuntu (no source) action to build only latest with simpler l…
lobis May 17, 2022
fd8dd4e
updated Ubuntu from source action to accept Major.Minor.Patch version…
lobis May 17, 2022
f2cc574
Updated fedora action, added test to Ubuntu action, removed CentOS fr…
lobis May 17, 2022
43a3679
fix typo in action
lobis May 17, 2022
b6348ba
updated prompt style
lobis May 17, 2022
9a7ee81
Added actions for arch, centos, conda, gentoo
lobis May 17, 2022
7f05a98
Normalized action name for Ubuntu
lobis May 17, 2022
a7a6595
Removed small formatting chagnes on Dockerfiles
lobis May 17, 2022
f011534
testing root version as tag
lobis May 17, 2022
f54a99d
debugging action
lobis May 17, 2022
db8bd27
fix typo
lobis May 17, 2022
0e21db7
fix action
lobis May 17, 2022
ff55a1f
Added fedora version to tag
lobis May 17, 2022
0be9efd
removed `"` from OS version
lobis May 17, 2022
e03ac64
fix error in action
lobis May 17, 2022
7c299a1
updated action for fedora and ubuntu
lobis May 17, 2022
54a5c5d
Added root version tag to images
lobis May 17, 2022
6af7f21
fix tag not pushing
lobis May 17, 2022
8d0b70e
updated image version tag
lobis May 17, 2022
18bf7bd
Added trigger when relevant files are updated
lobis May 17, 2022
cac173b
Merge branch 'master' of github.com:lobis/root-docker
lobis May 19, 2022
2bae1d4
added newline to packages
lobis May 19, 2022
ff107db
reverted README to master version
lobis May 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/docker-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Trigger Build and Publish All Images

on:
workflow_dispatch:

jobs:
exit:
runs-on: ubuntu-latest

steps:
- name: Print
run: |
echo "This is a way to start multiple workflows from manually activating one"
58 changes: 58 additions & 0 deletions .github/workflows/docker-arch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Arch Linux

on:
workflow_dispatch:
workflow_run:
workflows: ["Trigger Build and Publish All Images"]
types:
- completed
push:
paths:
- arch/**

jobs:
build-and-push-arch-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-arch

steps:
- name: Print Image name with tag(s)
run: |
echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}"

- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the GitHub Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_WRITE_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: arch/
pull: true
push: false
tags: ${{ env.IMAGE_NAME_WITH_TAG }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}

- name: root version
run: |
export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g')
echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV
echo "ROOT_VERSION=$ROOT_VERSION"

- name: Add additional tag to image and push it
run: |
export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-arch
docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG
docker push $IMAGE_NAME_WITH_NEW_TAG
61 changes: 61 additions & 0 deletions .github/workflows/docker-centos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CentOS 7

on:
workflow_dispatch:
workflow_run:
workflows: ["Trigger Build and Publish All Images"]
types:
- completed
push:
paths:
- centos7/**

jobs:
build-and-push-centos-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-centos

steps:
- name: Print Image name with tag(s)
run: |
echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}"

- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the GitHub Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_WRITE_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: centos7/
pull: true
push: false
tags: ${{ env.IMAGE_NAME_WITH_TAG }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}

- name: root version and OS version
run: |
export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g')
echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV
echo "ROOT_VERSION=$ROOT_VERSION"
export OS_VERSION_ID=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} cat /etc/os-release | grep VERSION_ID | sed -r 's/VERSION_ID=//g' | sed -r 's/"//g')
echo "OS_VERSION_ID=$OS_VERSION_ID" >> $GITHUB_ENV
echo "OS_VERSION_ID=$OS_VERSION_ID"

- name: Add additional tag to image and push it
run: |
export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-centos${{ env.OS_VERSION_ID }}
docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG
docker push $IMAGE_NAME_WITH_NEW_TAG
58 changes: 58 additions & 0 deletions .github/workflows/docker-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Conda

on:
workflow_dispatch:
workflow_run:
workflows: ["Trigger Build and Publish All Images"]
types:
- completed
push:
paths:
- conda/**

jobs:
build-and-push-conda-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-conda

steps:
- name: Print Image name with tag(s)
run: |
echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}"

- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the GitHub Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_WRITE_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: conda/
pull: true
push: false
tags: ${{ env.IMAGE_NAME_WITH_TAG }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}

- name: root version
run: |
export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g')
echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV
echo "ROOT_VERSION=$ROOT_VERSION"

- name: Add additional tag to image and push it
run: |
export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-conda
docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG
docker push $IMAGE_NAME_WITH_NEW_TAG
57 changes: 57 additions & 0 deletions .github/workflows/docker-fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Fedora

on:
workflow_dispatch:
workflow_run:
workflows: ["Trigger Build and Publish All Images"]
types:
- completed
push:
paths:
- fedora/**

jobs:
build-and-push-fedora-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-fedora

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the GitHub Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_WRITE_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: fedora/
pull: true
push: false
tags: ${{ env.IMAGE_NAME_WITH_TAG }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}

- name: root version and OS version
run: |
export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g')
echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV
echo "ROOT_VERSION=$ROOT_VERSION"
export OS_VERSION_ID=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} cat /etc/os-release | grep VERSION_ID | sed -r 's/VERSION_ID=//g' | sed -r 's/"//g')
echo "OS_VERSION_ID=$OS_VERSION_ID" >> $GITHUB_ENV
echo "OS_VERSION_ID=$OS_VERSION_ID"

- name: Add additional tag to image and push it
run: |
export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-fedora${{ env.OS_VERSION_ID }}
docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG
docker push $IMAGE_NAME_WITH_NEW_TAG
58 changes: 58 additions & 0 deletions .github/workflows/docker-gentoo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Gentoo

on:
workflow_dispatch:
workflow_run:
workflows: ["Trigger Build and Publish All Images"]
types:
- completed
push:
paths:
- gentoo/**

jobs:
build-and-push-gentoo-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-gentoo

steps:
- name: Print Image name with tag(s)
run: |
echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}"

- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the GitHub Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_WRITE_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: gentoo/
pull: true
push: false
tags: ${{ env.IMAGE_NAME_WITH_TAG }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}

- name: root version
run: |
export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g')
echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV
echo "ROOT_VERSION=$ROOT_VERSION"

- name: Add additional tag to image and push it
run: |
export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-gentoo
docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG
docker push $IMAGE_NAME_WITH_NEW_TAG
57 changes: 57 additions & 0 deletions .github/workflows/docker-ubuntu-from-source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Ubuntu (from source)

on:
workflow_dispatch:
inputs:
root-version-major:
required: true
description: ROOT Major version number (string) according to **Major.Minor.Patch** schema
default: "6"
root-version-minor:
required: true
description: ROOT Minor version number (string) according to **Major.Minor.Patch** schema
default: "26"
root-version-patch:
required: true
description: ROOT Patch version number (string) according to **Major.Minor.Patch** schema
default: "02"
push:
paths:
- ubuntu_from_source/**

jobs:
build-and-push-ubuntu-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
ROOT_VERSION_STRING: ${{ github.event.inputs.root-version-major }}.${{ github.event.inputs.root-version-minor }}.${{ github.event.inputs.root-version-patch }}

steps:
- name: Print Image name with tag(s)
run: |
echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}"

- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the GitHub Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_WRITE_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: ubuntu_from_source/
pull: true
push: true
build-args: |
ROOT_VERSION=${{ env.ROOT_VERSION_STRING }}
tags: ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION_STRING }}-ubuntu-from-source
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
Loading