tmp #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 shell-* images | |
run: docker compose build shell-* | |
- name: Build shell image | |
run: docker compose build shell | |
- 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/shell-bash-ble ghcr.io/carapace-sh/shell-bash-ble:${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-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/shell ghcr.io/carapace-sh/shell:${tag} | |
docker image push ghcr.io/carapace-sh/base:${tag} | |
docker image push ghcr.io/carapace-sh/shell-bash-ble:${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-xonsh:${tag} | |
docker image push ghcr.io/carapace-sh/shell-zsh:${tag} | |
docker image push ghcr.io/carapace-sh/shell:${tag} |