forked from pgadmin-org/pgadmin4
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (73 loc) · 2.94 KB
/
pgadmin.yml
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
name: build on change
on:
push:
branches:
- master
- main
workflow_dispatch:
repository_dispatch:
types: pgadmin
jobs:
pgadmin:
runs-on: ubuntu-20.04
steps:
- name: checkout code
uses: actions/checkout@v2
- name: docker login
run: docker login -u ${{ secrets.DOCKERUSERNAME }} -p ${{ secrets.DOCKERAPIKEY }}
- name: treehouses pgadmin
run: |
export DOCKER_CLI_EXPERIMENTAL=enabled
repo="dyeh123/pgadmin4"
base="dyeh123/alpine"
source .github/workflows/utils.sh
echo "amd64"
baseamd64=$(get_variant_sha "$base" "latest" "amd64")
echo $baseamd64
repoamd64=$(get_manifest_sha "$repo:latest" "amd64")
echo $repoamd64
echo "arm"
basearm=$(get_tag_sha "$base" "latest")
echo $basearm
repoarm=$(get_manifest_sha "$repo:latest" "arm")
echo $repoarm
echo "arm64"
basearm64=$(get_variant_sha "$base" "latest" "arm64")
echo $basearm64
repoarm64=$(get_manifest_sha "$repo:latest" "arm64")
echo $repoarm64
echo "change"
flag=$(compare_sha "$baseamd64" "$repoamd64" "$basearm" "$repoarm" "$basearm64" "$repoarm64")
echo $flag
if [[ $flag == true ]]; then
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
build_image "$base:latest" amd64 $repo
build_image "$base:latest" arm $repo
build_image "$base:latest" arm64 $repo
deploy_image $repo arm
deploy_image $repo amd64
deploy_image $repo arm64
sudo npm install -g @treehouses/cli
export gitter_channel="${{ secrets.CHANNEL }}"
echo "tags"
tag="$(date +%Y%m%d%H%M)"
echo $tag
docker manifest create $repo:$tag $repo-tags:amd64 $repo-tags:arm $repo-tags:arm64
docker manifest annotate $repo:$tag $repo-tags:amd64 --arch amd64
docker manifest annotate $repo:$tag $repo-tags:arm64 --arch arm64
docker manifest annotate $repo:$tag $repo-tags:arm --arch arm
docker manifest inspect $repo:$tag
docker manifest push $repo:$tag
tag2="latest"
echo $tag2
docker manifest create $repo:$tag2 $repo-tags:amd64 $repo-tags:arm $repo-tags:arm64
docker manifest annotate $repo:$tag2 $repo-tags:amd64 --arch amd64
docker manifest annotate $repo:$tag2 $repo-tags:arm64 --arch arm64
docker manifest annotate $repo:$tag2 $repo-tags:arm --arch arm
docker manifest inspect $repo:$tag2
docker manifest push $repo:$tag2
echo "https://hub.docker.com/r/treehouses/pgadmin/tags"
treehouses feedback "new treehouses/pgadmin check https://hub.docker.com/r/treehouses/pgadmin/tags"
else
echo "no changes"
fi