Skip to content

Commit 142d236

Browse files
committed
ci: add new actions workflow to publish image to github ghcr
available under: github_registry
1 parent ba85457 commit 142d236

File tree

4 files changed

+53
-4
lines changed

4 files changed

+53
-4
lines changed

.github/workflows/docker_hub.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: CI to Docker Hub
22

33
on:
44
push:
5-
branches:
6-
- 'master'
5+
branches: [ master ]
76

87
jobs:
98

.github/workflows/github_registry.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI to GHCR
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v2
15+
-
16+
name: Set up Docker Buildx
17+
id: buildx
18+
uses: docker/setup-buildx-action@v1
19+
-
20+
name: Cache Docker layers
21+
uses: actions/cache@v2
22+
with:
23+
path: /tmp/.buildx-cache
24+
key: ${{ runner.os }}-buildx-${{ github.sha }}
25+
restore-keys: |
26+
${{ runner.os }}-buildx-
27+
28+
-
29+
name: Login to ghcr
30+
if: github.event_name != 'pull_request'
31+
uses: docker/login-action@v1
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.repository_owner }}
35+
password: ${{ secrets.CR_PACKAGE_TOKEN }}
36+
-
37+
name: Build and push
38+
id: docker_build
39+
uses: docker/build-push-action@v2
40+
with:
41+
context: ./
42+
file: ./Dockerfile
43+
builder: ${{ steps.buildx.outputs.name }}
44+
push: true
45+
tags: ghcr.io/rttrorg/docker-ci:latest
46+
cache-from: type=local,src=/tmp/.buildx-cache
47+
cache-to: type=local,dest=/tmp/.buildx-cache
48+
-
49+
name: Image digest
50+
run: echo ${{ steps.docker_build.outputs.digest }}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 rttr.org
3+
Copyright (c) 2021 Axel Menzel <info@rttr.org>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ docker run -v $PWD:/$PWD --workdir=$PWD --privileged -ti --network host rttr/doc
3939

4040
# Historical Compilers
4141
- g++
42-
- g++-4.8, g++-4.9, g++-5, g++-7, g++-8, g++-9, g++-10, g++
42+
- g++-4.8, g++-4.9, g++-5, g++-7, g++-8, g++-9, g++-10
4343
- clang
4444
- clang-3.5, clang-3.6, clang-3.7, clang-3.8, clang-3.9, clang-4.0, clang-5.0, clang-6.0, clang-7, clang-8, clang-9, clang-10, clang-11
4545

0 commit comments

Comments
 (0)