Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Commit 0f1cad2

Browse files
committed
Reset Commits
0 parents  commit 0f1cad2

14 files changed

Lines changed: 1251 additions & 0 deletions

File tree

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.git
2+
.gitignore
3+
.github
4+
.gitattributes
5+
READMETEMPLATE.md
6+
README.md

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.github/vars.conf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file is automatically generated (based on this file)
2+
3+
# ~~~~~~~~~~~~~~~~~~~~~~~
4+
# auto-builder.yml
5+
# ~~~~~~~~~~~~~~~~~~~~~~~
6+
7+
TAGS=''
8+
LATEST=''
9+
10+
BUILD_SCHEDULE=''
11+
BRANCH='main'
12+
DOCKERHUB_IMAGE='amp'
13+
APP_VERSION_LINK=''
14+
PLATFORMS='linux/amd64,linux/arm64'
15+
APP_BRANCH=''
16+
BASE_OS='alpine'
17+
ON_RELEASE='true'
18+
VERSIONING='true'
19+
BUILD_ARGS=''
20+
TEST_SEARCH=''
21+
IMAGES=''
22+
23+
# ~~~~~~~~~~~~~~~~~~~~~~~
24+
# auto-release.yml
25+
# ~~~~~~~~~~~~~~~~~~~~~~~
26+
27+
RELEASE_SCHEDULE='20 0 * * 1-6'
28+
BEAUTY_NAME='AMP'
29+
# apostrophe needs be replaced with '\x27'
30+
RELEASE_VERSION_COMMAND='$(curl -sL "https://cubecoders.com/AMPVersions.json" | jq -r \x27.AMPCore\x27)'

.github/workflows/auto-builder.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# This file is automatically generated
2+
3+
name: Auto Builder CI
4+
5+
on:
6+
workflow_dispatch:
7+
repository_dispatch:
8+
release:
9+
types:
10+
- released
11+
12+
jobs:
13+
alpine-latest:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
ref: main
20+
fetch-depth: 0
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v1
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v1
27+
id: buildx
28+
29+
- name: Docker Login
30+
uses: docker/login-action@v1
31+
with:
32+
username: vcxpz
33+
password: ${{ secrets.DOCKER_PASSWORD }}
34+
35+
- name: Github Login
36+
run: |
37+
git config --global user.email "github-actions@github.com"
38+
git config --global user.name "github-actions"
39+
40+
- name: Build the Docker Image Locally (amd64)
41+
run: |
42+
docker buildx build \
43+
--platform=amd64 \
44+
--output "type=docker" \
45+
--build-arg BUILD_DATE="$(date +%Y-%m-%d)" \
46+
--build-arg VERSION=$(curl -sL "https://api.github.com/repos/hydazz/docker-amp/releases/latest" | jq -r '.tag_name') \
47+
--tag vcxpz/ci-build:ci-build \
48+
--file Dockerfile .
49+
50+
- name: Build and Push the Docker Image
51+
run: |
52+
docker buildx build \
53+
--platform=linux/amd64,linux/arm64 \
54+
--output "type=image,push=true" \
55+
--build-arg BUILD_DATE="$(date +%Y-%m-%d)" \
56+
--build-arg VERSION=$(curl -sL "https://api.github.com/repos/hydazz/docker-amp/releases/latest" | jq -r '.tag_name') \
57+
--tag vcxpz/amp:$(curl -sL "https://api.github.com/repos/hydazz/docker-amp/releases/latest" | jq -r '.tag_name') \
58+
--tag vcxpz/amp:latest \
59+
--file Dockerfile .
60+
61+
- name: Get New Package Versions From Image
62+
run: |
63+
docker run --rm --entrypoint /bin/sh -v ${PWD}:/tmp vcxpz/ci-build:ci-build -c '\
64+
curl -sSL https://raw.githubusercontent.com/hydazz/docker-utils/main/scripts/package_versioner.sh | bash'
65+
66+
- name: Commit and Push Changes to Github
67+
run: |
68+
git add -A
69+
git commit -m "Bot Updating Files" || true
70+
git push || true
71+
72+
- name: Sync README.md With Docker Hub
73+
uses: peter-evans/dockerhub-description@v2
74+
with:
75+
username: vcxpz
76+
password: ${{ secrets.DOCKER_PASSWORD }}
77+
repository: vcxpz/amp
78+

.github/workflows/auto-release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This file is automatically generated
2+
3+
name: Auto Release CI
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "20 0 * * 1-6"
9+
10+
jobs:
11+
check-for-updates:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Create Version
17+
env:
18+
TOKEN: ${{ secrets.TOKEN }}
19+
run: |
20+
git config --global user.email "github-actions@github.com"
21+
git config --global user.name "github-actions"
22+
VERSION=$(curl -sL "https://cubecoders.com/AMPVersions.json" | jq -r '.AMPCore')
23+
OLD_VERSION=$(curl -sL "https://api.github.com/repos/hydazz/docker-amp/releases/latest" | jq -r '.tag_name')
24+
printf '{
25+
"tag_name": "'${VERSION}'",
26+
"target_commitish": "'${main}'",
27+
"name": "'${VERSION}'",
28+
"body": "Upgrading AMP '${OLD_VERSION}' to '${VERSION}'",
29+
"draft": false,
30+
"prerelease": false
31+
}' >releasebody.json
32+
curl -H "Authorization: token ${TOKEN}" -X POST https://api.github.com/repos/hydazz/docker-amp/releases -d @releasebody.json
33+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file is automatically generated
2+
3+
name: Clear Workflow Runs CI
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "0 0 * * 0"
9+
10+
jobs:
11+
clear-workflow-runs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Clear all workflow runs
17+
env:
18+
TOKEN: ${{ secrets.TOKEN }}
19+
run: |
20+
echo "${TOKEN}" | gh auth login --with-token
21+
runs=$(gh api repos/hydazz/docker-amp/actions/runs | jq -r .total_count)
22+
while true; do
23+
if [[ $(gh api repos/hydazz/docker-amp/actions/runs | jq -r .total_count) -gt 2 ]]; then
24+
gh api repos/hydazz/docker-amp/actions/runs \
25+
--paginate -q '.workflow_runs[] | "\(.id)"' | \
26+
xargs -n1 -I % gh api repos/hydazz/docker-amp/actions/runs/% -X DELETE || true
27+
else
28+
exit 0
29+
fi
30+
done

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Windows image file caches
2+
Thumbs.db
3+
ehthumbs.db
4+
5+
# Folder config file
6+
Desktop.ini
7+
8+
# Recycle Bin used on file shares
9+
$RECYCLE.BIN/
10+
11+
# Windows Installer files
12+
*.cab
13+
*.msi
14+
*.msm
15+
*.msp
16+
17+
# Windows shortcuts
18+
*.lnk
19+
20+
# =========================
21+
# Operating System Files
22+
# =========================
23+
24+
# OSX
25+
# =========================
26+
27+
.DS_Store
28+
.AppleDouble
29+
.LSOverride
30+
31+
# Thumbnails
32+
._*
33+
34+
# Files that might appear on external disk
35+
.Spotlight-V100
36+
.Trashes
37+
38+
# Directories potentially created on remote AFP share
39+
.AppleDB
40+
.AppleDesktop
41+
Network Trash Folder
42+
Temporary Items
43+
.apdisk

Dockerfile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM vcxpz/baseimage-alpine-glibc:latest
2+
3+
# set version label
4+
ARG BUILD_DATE
5+
ARG VERSION
6+
LABEL build_version="AMP version:- ${VERSION} Build-date:- ${BUILD_DATE}"
7+
LABEL maintainer="hydaz"
8+
9+
# environment settings
10+
ENV VERSION=${VERSION} \
11+
HOME=/home/abc \
12+
USERNAME=admin \
13+
PASSWORD=password \
14+
MODULE=ADS \
15+
S6_SERVICES_GRACETIME=60000
16+
17+
RUN set -xe && \
18+
echo "**** install build packages ****" && \
19+
apk add --no-cache --virtual=build-dependencies \
20+
ca-certificates-mono && \
21+
echo "**** install runtime packages ****" && \
22+
apk add --no-cache \
23+
git \
24+
iputils \
25+
openjdk11-jre-headless \
26+
procps \
27+
socat \
28+
tmux \
29+
unzip && \
30+
echo "**** ensure abc has a shell ****" && \
31+
usermod -d /home/abc -m -s /bin/bash abc && \
32+
mkdir -p \
33+
/app/amp/ \
34+
/home/abc && \
35+
chown abc:abc /home/abc && \
36+
echo "**** download ampinstmgr.zip ****" && \
37+
curl -o \
38+
/tmp/ampinstmgr.zip -L \
39+
"http://cubecoders.com/Downloads/ampinstmgr.zip" && \
40+
echo "**** unzip ampinstmgr and make symlinks ****" && \
41+
unzip \
42+
/tmp/ampinstmgr.zip -d \
43+
/app/amp/ && \
44+
ln -s /app/amp/ampinstmgr /usr/bin/ampinstmgr && \
45+
echo "**** download AMPCache-${VERSION//./}.zip ****" && \
46+
curl -o \
47+
/app/amp/AMPCache-${VERSION//./}.zip -L \
48+
"http://cubecoders.com/Downloads/AMP_Latest.zip" && \
49+
echo "**** cleanup ****" && \
50+
apk del --purge \
51+
build-dependencies && \
52+
rm -rf \
53+
/tmp/*
54+
55+
# add local files
56+
COPY root/ /
57+
58+
# ports and volumes
59+
EXPOSE 8080
60+
VOLUME /config

0 commit comments

Comments
 (0)