Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrating travis to github actions #7

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/novnc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: novnc-docker-image-build

on:
push:
schedule:
- cron: '0 */8 * * *'

jobs:
novnc-docker-image-build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: docker login
run: docker login -u ${{ secrets.DOCKERUSERNAME }} -p ${{ secrets.DOCKERAPIKEY }}
- name: treehouses novnc
run: |
export DOCKER_CLI_EXPERIMENTAL=enabled
repo="rjpadilla/novnc"
source .github/workflows/utils.sh
alpine_arm_sha=$(get_manifest_sha "treehouses/alpine:latest" "arm")
echo "alpine arm"
echo $alpine_arm_sha
novnc_arm_sha=$(get_manifest_sha "novnc:latest" "arm")
echo "novnc arm"
echo $novnc_arm_sha
flag_arm=$(is_base "treehouses/alpine@"$alpine_arm_sha "novnc@"$novnc_arm_sha)
echo "flag arm"
echo $flag_arm
alpine_amd64_sha=$(get_manifest_sha "treehouses/alpine:latest" "amd64")
echo $alpine_amd64_sha
novnc_amd64_sha=$(get_manifest_sha "novnc:latest" "amd64")
echo $novnc_amd64_sha
flag_amd64=$(is_base "treehouses/alpine@"$alpine_amd64_sha "novnc@"$novnc_amd64_sha)
echo "flag amd64"
echo $flag_amd64
alpine_arm64_sha=$(get_manifest_sha "treehouses/alpine:latest" "arm64")
echo "alpine arm64"
echo $alpine_arm64_sha
novnc_arm64_sha=$(get_manifest_sha "novnc:latest" "arm64")
echo "novnc arm64"
echo $novnc_arm64_sha
flag_arm64=$(is_base "treehouses/alpine@"$alpine_arm64_sha "novnc@"$novnc_arm64_sha)
echo "flag arm64"
echo $flag_arm64
version2=$(image_version novnc:latest)
echo "repo version is $version2"
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
build_image "treehouses/alpine:latest" arm "$repo"
build_image "treehouses/alpine:latest" amd64 "$repo"
build_image "treehouses/alpine:latest" arm64 "$repo"
flag=$(compare "treehouses/alpine@"$alpine_arm_sha "novnc@"$novnc_arm_sha "treehouses/alpine@"$alpine_amd64_sha "novnc@"$novnc_amd64_sha "treehouses/alpine@"$alpine_arm64_sha "novnc@"$novnc_arm64_sha "novnc" "novnc-tags:amd64")
echo $flag
deploy_image "$repo" arm
deploy_image "$repo" amd64
deploy_image "$repo" arm64
tag=$(date +%Y%m%d%H%M)
tag2="latest"
echo $tag
create_manifest $repo $tag $tag2 $repo-tags:amd64 $repo-tags:arm $repo-tags:arm64
docker manifest inspect $repo:$tag
docker manifest inspect $repo:$tag2
if [[ $flag == true ]]; then
docker manifest push $repo:$tag; docker manifest push $repo:$tag2
else
echo "no changes"
fi
File renamed without changes.
2 changes: 1 addition & 1 deletion Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV VNC_PORT=5900 \
NOVNC_HOME=/srv/noVNC \
GET_HOST="ip route | awk '/default/ { print \$3 }'"

RUN apk update && apk add --no-cache git python2 procps && \
RUN apk update && apk add --no-cache git python3 bash procps && \
mkdir -p $NOVNC_HOME && \
wget -qO- https://github.com/novnc/noVNC/archive/v1.2.0.tar.gz | tar xz --strip 1 -C $NOVNC_HOME && \
chmod +x $NOVNC_HOME/utils/*.sh
Expand Down