Skip to content

Commit f35311c

Browse files
Added A Doocker Build.
1 parent 5e1f98b commit f35311c

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: "Release - Github 🐳 Registry"
2+
3+
env:
4+
DIST_LOCATION: "./dist/"
5+
VS_WORKFLOW_TYPE: "github-docker-release"
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- main
12+
release:
13+
types:
14+
- published
15+
16+
jobs:
17+
publish-github-docker:
18+
name: "🚀 Github 🐳 Registry Publisher"
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: "📥 Fetching Repository Contents"
22+
uses: actions/checkout@main
23+
24+
- name: "💾 Github Repository Metadata"
25+
uses: varunsridharan/action-repository-meta@main
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: "💫 VS Utility"
30+
uses: varunsridharan/action-vs-utility@main
31+
32+
- name: "⚡ Repository - Before Hook"
33+
run: |
34+
echo " "
35+
if [ -f $VS_BEFORE_HOOK_FILE_LOCATION ]; then
36+
echo "✅ Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
37+
sh $VS_BEFORE_HOOK_FILE_LOCATION
38+
else
39+
echo "⚠️ No Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
40+
fi
41+
echo " "
42+
43+
- name: "⚡ Docker QEMU"
44+
uses: docker/setup-qemu-action@master
45+
46+
- name: "⚡ Docker BuildX"
47+
uses: docker/setup-buildx-action@master
48+
49+
- name: "🔒 Log into GitHub Container Registry"
50+
uses: docker/login-action@master
51+
with:
52+
registry: ghcr.io
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.GH_REPO }}
55+
56+
- name: "🎉 Build & 🚀 Publish"
57+
uses: docker/build-push-action@master
58+
with:
59+
push: true
60+
tags: |
61+
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ env.DOCKER_IMAGE_SLUG }}:latest
62+
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ env.DOCKER_IMAGE_SLUG }}:${{ env.RELEASE_VERSION }}
63+
64+
- name: "⚡ Repository - After Hook"
65+
run: |
66+
echo " "
67+
if [ -f $VS_AFTER_HOOK_FILE_LOCATION ]; then
68+
echo "✅ After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
69+
sh $VS_AFTER_HOOK_FILE_LOCATION
70+
else
71+
echo "⚠️ No After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
72+
fi
73+
echo " "

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
FROM varunsridharan/actions-alpine:latest
22

3+
LABEL maintainer="Varun Sridharan<[email protected]>"
4+
5+
LABEL org.opencontainers.image.source = "https://github.com/varunsridharan/action-github-workflow-sync/"
6+
7+
LABEL org.opencontainers.image.authors="Varun Sridharan <[email protected]>"
8+
9+
LABEL org.opencontainers.image.url="https://github.com/varunsridharan/action-github-workflow-sync/"
10+
11+
LABEL org.opencontainers.image.documentation="https://github.com/varunsridharan/action-github-workflow-sync/"
12+
13+
LABEL org.opencontainers.image.vendor="Varun Sridharan"
14+
315
COPY entrypoint.sh /entrypoint.sh
416

517
RUN chmod 777 entrypoint.sh

0 commit comments

Comments
 (0)