Skip to content

2.x: Keeping only ce-provision 2.x #18

2.x: Keeping only ce-provision 2.x

2.x: Keeping only ce-provision 2.x #18

name: '2.x-devel: Build the devel ce-dev base and controller images'
# Run this workflow only on a push/merged PR to branch devel
on:
push:
branches:
- 2.x-devel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install modules
run: yarn
# Uses https://oclif.io/
- name: Pack the JS
run: yarn oclif pack tarballs --targets=linux-arm,linux-x64,darwin-x64 --no-xz
- name: Rename the dist/* files
run: yarn renamedist
# We build mkcert from source because releases are broken
# The last step sets ce-dev config to NOT use sudo because this causes docker image push problems
- name: Install build and publish dependencies
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full libnss3-tools wget
cd /tmp
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
mkdir -p ~/.config/ce-dev
touch ~/.config/ce-dev/preferences-2.x.yml
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-2.x.yml
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-2.x.yml
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-2.x.yml
- name: Build and push Docker images
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
/bin/sh docker-images/export.sh --version devel --image-name ce-dev --base-image debian:bookworm-slim --dockerfile-path base-devel --push
/bin/sh docker-images/export.sh --version devel --image-name ce-dev-controller --base-image debian:bookworm-slim --dockerfile-path controller-devel --push