[Kubernetes] Test v1.29.0 [sync git] #1580
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- "20.10" | |
tags: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
skip: | |
runs-on: ubuntu-latest | |
if: | | |
(! (contains( github.event.head_commit.message, '[skip ci]') | |
|| contains( github.event.head_commit.message, '[skip action]') | |
|| contains( github.event.head_commit.message, '[skip actions]') | |
|| contains( github.event.head_commit.message, '[ci skip]') | |
|| contains( github.event.head_commit.message, '[actions skip]') | |
|| contains( github.event.head_commit.message, '[action skip]'))) | |
steps: | |
- run: echo "build continue !" | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-12 | |
needs: skip | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash --noprofile --norc -exo pipefail {0} | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 2 | |
- uses: docker-practice/actions-setup-docker@master | |
with: | |
docker_channel: test | |
docker_version: "20.10" | |
- uses: azure/docker-login@v1 | |
if: | | |
github.event_name == 'push' | |
&& startsWith(matrix.os, 'ubuntu' ) | |
with: | |
# login-server: contoso.azurecr.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: azure/docker-login@v1 | |
if: | | |
github.event_name == 'push' | |
&& startsWith(matrix.os, 'ubuntu' ) | |
with: | |
login-server: ghcr.io | |
username: khs1994 | |
password: ${{ secrets.GHCR_IO_TOKEN }} | |
- uses: azure/docker-login@v1 | |
if: | | |
github.event_name == 'push' | |
&& startsWith(matrix.os, 'ubuntu' ) | |
with: | |
login-server: pcit-docker.pkg.coding.net | |
username: khs1994-1601432822176 | |
password: ${{secrets.CODING_DOCKER_PASSWORD}} | |
- name: Stop MySQL | |
run: sudo systemctl stop mysql | |
if: | | |
startsWith(matrix.os, 'ubuntu' ) | |
- name: Test | |
run: | | |
QUITE=true ./lnmp-docker test development | |
# command -v docker-compose | |
# sudo rm -rf $(command -v docker-compose) || true | |
# export LNMP_SERVICES="nginx mariadb php8 redis" | |
# export LREW_INCLUDE="mariadb" | |
if: | | |
startsWith(matrix.os, 'ubuntu' ) | |
- name: Up | |
run: | | |
./lnmp-docker config > docker-compose.yml | |
docker compose config -q | |
docker compose up -d $(./lnmp-docker services) | |
sleep 20 | |
docker ps -a | |
curl -fsSL 127.0.0.1 | |
quite=true ./lnmp-docker down | |
./lnmp-docker up | |
- name: Connect | |
run: | | |
sleep 20 | |
curl -fsSL 127.0.0.1 | |
- name: Down | |
run: ./lnmp-docker down | |
- name: Test Swarm mode | |
run: | | |
QUITE=true ./lnmp-docker test swarm | |
if: | | |
startsWith(matrix.os, 'ubuntu' ) | |
- shell: pwsh | |
run: ./lnmp-docker.ps1 | |
- name: Set ENV | |
run: | | |
echo "$(pwd)" >> $GITHUB_PATH | |
echo "$(pwd)/bin" >> $GITHUB_PATH | |
#echo "LNMP_PATH=$(pwd)" >> $GITHUB_ENV | |
- name: lnmp-CLI | |
run: | | |
sleep 10 | |
lnmp-php -v | |
lnmp-composer --version | |
lnmp-npm -v | |
lnmp-yarn -v | |
- name: build and push [ lwpm ] image | |
if: | | |
contains( github.event.head_commit.message, '[lwpm]' ) | |
&& github.event_name == 'push' | |
&& startsWith(matrix.os, 'ubuntu' ) | |
run: | | |
docker buildx build -t lwpm/lwpm \ | |
-t ghcr.io/khs1994/lwpm \ | |
-t pcit-docker.pkg.coding.net/khs1994-docker/lwpm/lwpm \ | |
-f windows/lwpm.Dockerfile --push windows | |
- name: build and push [ docker-image-sync ] image | |
if: | | |
contains( github.event.head_commit.message, '[lwpm]' ) | |
&& github.event_name == 'push' | |
&& startsWith(matrix.os, 'ubuntu' ) | |
run: | | |
docker buildx build -t khs1994/docker-image-sync \ | |
-t ghcr.io/khs1994/docker-image-sync \ | |
-t pcit-docker.pkg.coding.net/khs1994-docker/khs1994/docker-image-sync \ | |
-f windows/docker-image-sync.Dockerfile --push windows | |
- name: build and push [ lrew ] image | |
if: | | |
contains( github.event.head_commit.message, '[lrew]' ) | |
&& github.event_name == 'push' | |
&& startsWith(matrix.os, 'ubuntu' ) | |
run: | | |
docker buildx build -t lrew/lrew \ | |
-t ghcr.io/lrew/lrew \ | |
-t pcit-docker.pkg.coding.net/khs1994-docker/lrew/lrew \ | |
--push lrew | |
- name: Config git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "gh-bot" | |
- name: rm lnmp | |
run: | | |
cd .. | |
sudo rm -rf lnmp | |
mkdir lnmp | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 2 | |
- name: Check config | |
run: | | |
sudo apt install -y tree | |
cd config | |
./default.sh | |
tree . | |
cd .. | |
git status | grep "nothing to commit" && exit 0 || true | |
git add . | |
git commit -m "[Config] Update default config" || exit 0 | |
git remote add github https://khs1994:${GITHUB_TOKEN}@github.com/khs1994-docker/lnmp.git | |
git checkout -b 20.10-config | |
git push github 20.10-config -f | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
if: | | |
startsWith(matrix.os, 'ubuntu' ) | |
powershell: | |
needs: skip | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 2 | |
- shell: powershell | |
run: | | |
./lnmp-docker.ps1 |