FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
CommunitySolidServer/.github/workflows/docker.yml at main · CommunitySolidServer/CommunitySolidServer · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
CommunitySolidServer
/
CommunitySolidServer
Public
Notifications
You must be signed in to change notification settings
Fork
159
Star
603
Code
Issues
118
Pull requests
19
Discussions
Actions
Projects
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
CommunitySolidServer
/
.github
/
workflows
/
docker.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
93 lines (87 loc) · 3.25 KB
Breadcrumbs
CommunitySolidServer
/
.github
/
workflows
/
docker.yml
Copy path
File metadata and controls
93 lines (87 loc) · 3.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name
:
Docker
on
:
workflow_call
:
secrets
:
DOCKERHUB_TOKEN
:
required
:
true
DOCKERHUB_USERNAME
:
required
:
true
jobs
:
docker-meta
:
#
Generates the metadata (labels and tags) for the docker containers
#
- push to main results in the edge tag
#
- version tag results in edge, latest and semver, major, major.minor tags
#
- push to versions/ results in the next tag
runs-on
:
ubuntu-latest
outputs
:
labels
:
${{ steps.meta-main.outputs.labels || steps.meta-version.outputs.labels }}
tags
:
${{ steps.meta-main.outputs.tags || steps.meta-version.outputs.tags }}
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v7.0.1
-
if
:
startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main')
name
:
Docker meta edge and version tag
id
:
meta-main
uses
:
docker/metadata-action@v6
with
:
images
:
|
solidproject/community-server
#
Edge will always be executed (without latest tag), semver only on tag push events (with latest tag)
tags
:
|
type=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
github-token
:
${{ secrets.github_token }}
-
if
:
startsWith(github.ref, 'refs/heads/versions/')
name
:
Docker meta next
id
:
meta-version
uses
:
docker/metadata-action@v6
with
:
images
:
|
solidproject/community-server
#
Just one label: next (no latest here) for the last pushed commit on this branch
tags
:
|
type=raw,value=next
github-token
:
${{ secrets.github_token }}
docker
:
#
Builds, tests and pushes docker containers
needs
:
docker-meta
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v7.0.1
-
name
:
Set up QEMU
uses
:
docker/setup-qemu-action@v4
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v4
-
name
:
Login to DockerHub
uses
:
docker/login-action@v4.6.0
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
-
name
:
Build and export to docker
uses
:
docker/build-push-action@v7
with
:
context
:
.
load
:
true
tags
:
${{ needs.docker-meta.outputs.tags }}
labels
:
${{ needs.docker-meta.outputs.labels }}
-
name
:
Test all docker-built image tags
shell
:
bash
#
Loop over all generated image:tag names and docker run them.
#
If they aren't built previously, the command will error.
#
If they don't work, the job will fail.
#
If they work the --version argument should return a version and the job succeeds.
run
:
|
while read i; do
docker run --rm --pull never $i --version
done <<< "${{ needs.docker-meta.outputs.tags }}";
-
name
:
Build and push
uses
:
docker/build-push-action@v7
with
:
context
:
.
push
:
true
platforms
:
linux/amd64,linux/arm/v7,linux/arm/v8,linux/arm64/v8
tags
:
${{ needs.docker-meta.outputs.tags }}
labels
:
${{ needs.docker-meta.outputs.labels }}
Back
|
FazBrowse Home
|
New Git URL