Skip to content

Commit dce8f00

Browse files
authored
chore: Deploy ocamlsf/emacs-learn-ocaml-client:{master,$tags} (#433)
(for CI purpose)
1 parent adbb063 commit dce8f00

File tree

5 files changed

+119
-0
lines changed

5 files changed

+119
-0
lines changed

.github/workflows/deploy-master.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,23 @@ jobs:
4141
repository: ocamlsf/learn-ocaml-client
4242
target: client
4343
tags: master
44+
push_emacs_client:
45+
name: Push emacs-learn-ocaml-client image to Docker Hub
46+
needs: push_client
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Check out the repo
50+
uses: actions/checkout@v2
51+
- name: Push to Docker Hub
52+
# https://github.com/docker/build-push-action/tree/releases/v1#readme
53+
uses: docker/build-push-action@v1
54+
with:
55+
path: ci/docker-emacs-learn-ocaml-client
56+
build_args: "base=ocamlsf/learn-ocaml-client,version=master"
57+
always_pull: true
58+
add_git_labels: true
59+
labels: "org.opencontainers.image.version=master"
60+
username: ${{ secrets.DOCKER_USERNAME }}
61+
password: ${{ secrets.DOCKER_PASSWORD }}
62+
repository: ocamlsf/emacs-learn-ocaml-client
63+
tags: master

.github/workflows/deploy-tags.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,26 @@ jobs:
4646
target: client
4747
tags: latest
4848
tag_with_ref: true
49+
push_emacs_client:
50+
name: Push emacs-learn-ocaml-client image to Docker Hub
51+
needs: push_client
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Check out the repo
55+
uses: actions/checkout@v2
56+
- name: Get tag name
57+
run: tag="${{ github.ref }}"; echo "::set-output name=tag::${tag#refs/tags/}"
58+
id: tag
59+
- name: Push to Docker Hub
60+
# https://github.com/docker/build-push-action/tree/releases/v1#readme
61+
uses: docker/build-push-action@v1
62+
with:
63+
path: ci/docker-emacs-learn-ocaml-client
64+
build_args: "base=ocamlsf/learn-ocaml-client,version=${{ steps.tag.outputs.tag }}"
65+
always_pull: true
66+
add_git_labels: true
67+
labels: "org.opencontainers.image.version=${{ steps.tag.outputs.tag }}"
68+
username: ${{ secrets.DOCKER_USERNAME }}
69+
password: ${{ secrets.DOCKER_PASSWORD }}
70+
repository: ocamlsf/emacs-learn-ocaml-client
71+
tags: ${{ steps.tag.outputs.tag }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.emacs
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
;;; .emacs --- Emacs conf file -*- coding: utf-8 -*-
2+
3+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4+
5+
;; Config de package.el, MELPA et use-package
6+
7+
(require 'package)
8+
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
9+
(package-initialize)
10+
11+
(unless (package-installed-p 'use-package)
12+
(package-refresh-contents)
13+
(package-install 'use-package))
14+
(eval-when-compile
15+
(require 'use-package))
16+
17+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18+
19+
;; Config de Tuareg, Merlin et Company
20+
21+
(use-package tuareg
22+
:ensure t
23+
:defer t
24+
:init
25+
(setq tuareg-opam-insinuate t))
26+
27+
;; Merlin would require OPAM ...
28+
29+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30+
31+
;; Config générale
32+
33+
(setq column-number-mode t
34+
line-number-mode t
35+
require-final-newline t)
36+
37+
;; Marquage des parenthèses
38+
(load-library "paren")
39+
(show-paren-mode 1)
40+
41+
;; Raccourcis C-c/C-x/C-v/C-z standards
42+
;; au lieu de M-w/C-w/C-y/C-_ par défaut dans GNU Emacs
43+
(cua-mode 1)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ARG base=ocamlsf/learn-ocaml-client
2+
ARG version=master
3+
FROM ${base}:${version}
4+
5+
WORKDIR /home/learn-ocaml
6+
7+
USER root
8+
9+
RUN apk add --no-cache \
10+
bash \
11+
curl \
12+
emacs-nox \
13+
make \
14+
&& mkdir -p -v bin \
15+
&& chown -v learn-ocaml:learn-ocaml bin
16+
17+
ENV PATH /home/learn-ocaml/bin:${PATH}
18+
19+
ENV LANG C.UTF-8
20+
# ENV LC_ALL C.UTF-8
21+
# ENV LANGUAGE en_US:en
22+
23+
COPY --chown=learn-ocaml:learn-ocaml .emacs .emacs
24+
25+
USER learn-ocaml
26+
27+
# Do some automatic Emacs installation/byte-compilation:
28+
RUN emacs --version && emacs --batch -l ${HOME}/.emacs
29+
30+
ENTRYPOINT []
31+
CMD ["/bin/sh"]

0 commit comments

Comments
 (0)