FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
dreamwidth/.github/workflows/devcontainer-build.yml at main · dreamwidth/dreamwidth · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
dreamwidth
/
dreamwidth
Public
Notifications
You must be signed in to change notification settings
Fork
182
Star
215
Code
Issues
381
Pull requests
12
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
dreamwidth
/
.github
/
workflows
/
devcontainer-build.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
68 lines (52 loc) · 1.96 KB
Breadcrumbs
dreamwidth
/
.github
/
workflows
/
devcontainer-build.yml
Copy path
File metadata and controls
68 lines (52 loc) · 1.96 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
name
:
(package) devcontainer image build
on
:
workflow_dispatch
:
schedule
:
-
cron
:
"
45 1 * * *
"
push
:
branches
:
-
main
paths
:
-
"
.devcontainer/**
"
-
"
doc/dependencies-system
"
-
"
doc/dependencies-cpanm
"
env
:
IMAGE_NAME
:
devcontainer
jobs
:
build
:
if
:
github.repository == 'dreamwidth/dreamwidth'
runs-on
:
ubuntu-latest
permissions
:
packages
:
write
steps
:
-
name
:
Checkout Code
uses
:
actions/checkout@v3
-
name
:
Build image
run
:
docker build --provenance=false -t $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" -f .devcontainer/Dockerfile .
-
name
:
Log in to registry
run
:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
-
name
:
Push image
run
:
|
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention for master/main
[ "$VERSION" == "master" ] && VERSION=latest
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
# Get sha256 for later
IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME | cut -d@ -f2)
echo "IMAGE_DIGEST=$IMAGE_DIGEST" >> $GITHUB_ENV
-
name
:
Notify Discord
uses
:
sarisia/actions-status-discord@v1
if
:
always()
with
:
description
:
"
Package digest: `${{ env.IMAGE_DIGEST }}`
"
webhook
:
${{ secrets.DISCORD_WEBHOOK }}
Back
|
FazBrowse Home
|
New Git URL