-
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 3.16 KB
/
docker.yml
File metadata and controls
69 lines (60 loc) · 3.16 KB
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
name: Docker
on:
push:
branches:
- 'master'
tags:
- 'v*'
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v6
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
run: docker compose build base
- name: Build base dependent images
run: docker compose build mdbook shell-*
- name: Build shell-* dependent image
run: docker compose build dev
- name: Build dev dependent image
run: docker compose build vhs
- name: Upload the images
run: |
tag=latest
[[ "$GITHUB_REF" =~ ^refs/tags/ ]] && tag="${GITHUB_REF/refs\/tags\//}"
docker image tag ghcr.io/carapace-sh/base ghcr.io/carapace-sh/base:${tag}
docker image tag ghcr.io/carapace-sh/mdbook ghcr.io/carapace-sh/mdbook:${tag}
docker image tag ghcr.io/carapace-sh/shell-bash-ble ghcr.io/carapace-sh/shell-bash-ble:${tag}
docker image tag ghcr.io/carapace-sh/shell-cmd ghcr.io/carapace-sh/shell-cmd:${tag}
docker image tag ghcr.io/carapace-sh/shell-elvish ghcr.io/carapace-sh/shell-elvish:${tag}
docker image tag ghcr.io/carapace-sh/shell-fish ghcr.io/carapace-sh/shell-fish:${tag}
docker image tag ghcr.io/carapace-sh/shell-nushell ghcr.io/carapace-sh/shell-nushell:${tag}
docker image tag ghcr.io/carapace-sh/shell-oil ghcr.io/carapace-sh/shell-oil:${tag}
docker image tag ghcr.io/carapace-sh/shell-powershell ghcr.io/carapace-sh/shell-powershell:${tag}
docker image tag ghcr.io/carapace-sh/shell-tcsh ghcr.io/carapace-sh/shell-tcsh:${tag}
docker image tag ghcr.io/carapace-sh/shell-xonsh ghcr.io/carapace-sh/shell-xonsh:${tag}
docker image tag ghcr.io/carapace-sh/shell-zsh ghcr.io/carapace-sh/shell-zsh:${tag}
docker image tag ghcr.io/carapace-sh/dev ghcr.io/carapace-sh/dev:${tag}
docker image tag ghcr.io/carapace-sh/vhs ghcr.io/carapace-sh/vhs:${tag}
docker image push ghcr.io/carapace-sh/base:${tag}
docker image push ghcr.io/carapace-sh/mdbook:${tag}
docker image push ghcr.io/carapace-sh/shell-bash-ble:${tag}
docker image push ghcr.io/carapace-sh/shell-cmd:${tag}
docker image push ghcr.io/carapace-sh/shell-elvish:${tag}
docker image push ghcr.io/carapace-sh/shell-fish:${tag}
docker image push ghcr.io/carapace-sh/shell-nushell:${tag}
docker image push ghcr.io/carapace-sh/shell-oil:${tag}
docker image push ghcr.io/carapace-sh/shell-powershell:${tag}
docker image push ghcr.io/carapace-sh/shell-tcsh:${tag}
docker image push ghcr.io/carapace-sh/shell-xonsh:${tag}
docker image push ghcr.io/carapace-sh/shell-zsh:${tag}
docker image push ghcr.io/carapace-sh/dev:${tag}
docker image push ghcr.io/carapace-sh/vhs:${tag}