From ccace689725f73b5115761047be9c09acee02243 Mon Sep 17 00:00:00 2001 From: Faye Date: Fri, 8 Nov 2024 15:36:08 +0100 Subject: [PATCH] Upgrade to JS 23.1 --- .circleci/config.yml | 33 --------------------------------- .github/workflows/force-ci-run | 3 +++ .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ README.md | 6 +++--- docker/Dockerfile | 19 ++++++++++--------- docker/Dockerfile.base | 2 +- docker/image_name.json | 2 +- 7 files changed, 44 insertions(+), 47 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/force-ci-run create mode 100644 .github/workflows/main.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 5d40afd..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: 2 -jobs: - build-publish-trigger: - machine: - image: ubuntu-2204:2022.04.2 - steps: - - checkout - - run: - name: Build image, test it, push it dockerhub, notify dependents - command: ./pipe_build_up_test.sh - -workflows: - version: 2 - nightly: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: [ master ] - jobs: - - build-publish-trigger: - context: cyberdojo-languages-context - filters: - branches: - only: [ master ] - commit: - jobs: - - build-publish-trigger: - context: cyberdojo-languages-context - filters: - branches: - only: [ master ] diff --git a/.github/workflows/force-ci-run b/.github/workflows/force-ci-run new file mode 100644 index 0000000..bbf2545 --- /dev/null +++ b/.github/workflows/force-ci-run @@ -0,0 +1,3 @@ + +Edit this file for a quick way to force a CI run +0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..685c725 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Main + +on: + push: + branches: + - master + +# These environment variables are used in the image builder script used to +# build Docker images +env: + PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Token for GHCR + PACKAGES_USERNAME: ${{ github.actor }} # Username for GHCR + REPO_NAME: ${{ github.event.repository.name }} # Repository name (so image_builder can check if it's testing itself) + TYPE: ${{ github.event_name }} # Event type (push or schedule) (so image_builder doesn't push images to GHCR on schedule) + +jobs: + + build-publish-trigger: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build image, test it, push it dockerhub, notify dependents + run: ./pipe_build_up_test.sh \ No newline at end of file diff --git a/README.md b/README.md index 6e9d4ea..a453431 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![CircleCI](https://circleci.com/gh/cyber-dojo-languages/javascript-assert-jquery.svg?style=svg)](https://circleci.com/gh/cyber-dojo-languages/javascript-assert-jquery) +[![Github Action (main)](https://github.com/cyber-dojo-languages/javascript-assert-jquery/actions/workflows/main.yml/badge.svg)](https://github.com/cyber-dojo-languages/javascript-assert-jquery/actions) -## display_name="Javascript, assert+jQuery" -## image_name="cyberdojofoundation/javascript_node_assert_jquery" +## display_name="Javascript 23.1.0, assert+jQuery 3.7.1" +## image_name="ghcr.io/cyber-dojo-languages/javascript_node_assert_jquery" ![cyber-dojo.org home page](https://github.com/cyber-dojo/cyber-dojo/blob/master/shared/home_page_snapshot.png) diff --git a/docker/Dockerfile b/docker/Dockerfile index 23d5e1f..ea17b7c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,19 +1,20 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # DO NOT EDIT THIS FILE. IT IS AUTO_GENERATED # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -FROM cyberdojofoundation/javascript-node_assert +FROM cyberdojofoundation/javascript-node:8afa909 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -# START of extra commands to fulfil runner's requirements (os=Ubuntu) -RUN (getent group sandbox) || (addgroup --gid 51966 sandbox) -RUN (grep -q sandbox:x:41966 /etc/passwd) || (adduser --disabled-password --gecos "" --home /home/sandbox --ingroup sandbox --shell /bin/bash --uid 41966 sandbox) -RUN apt-get update && apt-get install --yes coreutils bash tar file +# START of extra commands to fulfil runner's requirements (os=Alpine) +RUN (getent group sandbox) || (addgroup -g 51966 sandbox) +RUN (grep -q sandbox:x:41966 /etc/passwd) || (adduser -D -g "" -h /home/sandbox -G sandbox -s /bin/bash -u 41966 sandbox) +RUN apk add --update coreutils bash tar file +ARG GIT_COMMIT_SHA +ENV SHA=${GIT_COMMIT_SHA} # END of extra commands to fulfil runner's requirements # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> LABEL maintainer=jon@jaggersoft.com -WORKDIR /usr/local/lib/node_modules -RUN npm install jsdom -RUN npm install jquery -ENV NODE_PATH /usr/local/lib/node_modules +RUN npm install --global jsdom jquery + +COPY red_amber_green.rb /usr/local/bin diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 6308d5b..dfa036f 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -1,4 +1,4 @@ -FROM cyberdojofoundation/javascript-node:8afa909 +FROM ghcr.io/cyber-dojo-languages/javascript-node:3221b9d LABEL maintainer=jon@jaggersoft.com RUN npm install --global jsdom jquery diff --git a/docker/image_name.json b/docker/image_name.json index f48b2b8..3069409 100644 --- a/docker/image_name.json +++ b/docker/image_name.json @@ -1,3 +1,3 @@ { - "image_name": "cyberdojofoundation/javascript_node_assert_jquery" + "image_name": "ghcr.io/cyber-dojo-languages/javascript_node_assert_jquery" } \ No newline at end of file