From 6e3a6b7b316da6ee4aeefd3d7ab7828a8a677056 Mon Sep 17 00:00:00 2001 From: Sean T Allen Date: Mon, 27 Nov 2023 15:30:58 -0500 Subject: [PATCH] Add image for releasing Pony related Emacs modes (#66) --- .github/workflows/pr.yml | 8 ++++++++ emacs-mode-release/Dockerfile | 5 +++++ emacs-mode-release/README.md | 3 +++ emacs-mode-release/build-and-push.bash | 17 +++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 emacs-mode-release/Dockerfile create mode 100644 emacs-mode-release/README.md create mode 100644 emacs-mode-release/build-and-push.bash diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c50dae3..e25ac50 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -30,6 +30,14 @@ jobs: - name: Docker build run: "docker build --pull --file=actionlint/Dockerfile ." + validate-emacs-mode-release-image-builds: + name: Validate release Docker image builds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Docker build + run: "docker build --pull --file=emacs-mode-release/Dockerfile ." + validate-release-a-library-image-builds: name: Validate release-a-library Docker image builds runs-on: ubuntu-latest diff --git a/emacs-mode-release/Dockerfile b/emacs-mode-release/Dockerfile new file mode 100644 index 0000000..2fef205 --- /dev/null +++ b/emacs-mode-release/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:3.18 + +RUN apk add --update --no-cache \ + bash \ + git diff --git a/emacs-mode-release/README.md b/emacs-mode-release/README.md new file mode 100644 index 0000000..4af7f5e --- /dev/null +++ b/emacs-mode-release/README.md @@ -0,0 +1,3 @@ +# emacs-mode-release + +Simple image with the tools needed to do a release of our Pony related Emacs modes. diff --git a/emacs-mode-release/build-and-push.bash b/emacs-mode-release/build-and-push.bash new file mode 100644 index 0000000..3b1c1f5 --- /dev/null +++ b/emacs-mode-release/build-and-push.bash @@ -0,0 +1,17 @@ +#!/bin/bash + +set -o errexit +set -o nounset + +# +# *** You should already be logged into GitHub Container Registry +# when you run this *** +# + +NAME="ponylang/shared-docker-ci-emacs-mode-release" +TODAY=$(date +%Y%m%d) +DOCKERFILE_DIR="$(dirname "$0")" + +NAME="ghcr.io/${NAME}" +docker build --pull -t "${NAME}:${TODAY}" "${DOCKERFILE_DIR}" +docker push "${NAME}:${TODAY}"