-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Test Mix | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.bat' | ||
- 'ecs/**' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.bat' | ||
- 'ecs/**' | ||
|
||
jobs: | ||
build-mix: | ||
name: Build Mix | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 1 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build mix image | ||
run: | | ||
(cd mix && docker build -t ejabberd/mix .) | ||
- name: Build ecs image | ||
run: | | ||
cd ecs | ||
./build.sh latest | ||
- name: Run ecs image | ||
run: | | ||
docker images | ||
docker run --name ejabberd -d -p 5222:5222 ejabberd/ecs:latest | ||
- name: Wait ejabberd started | ||
run: | | ||
docker exec ejabberd bin/ejabberdctl started | ||
- name: Check ecs results | ||
run: | | ||
docker ps -s | ||
docker logs ejabberd | ||
docker logs ejabberd | grep -q "Start accepting TCP connections" || exit 1 | ||
docker logs ejabberd | grep -q "error" && exit 1 || exit 0 | ||
docker logs ejabberd | grep -q "Error" && exit 1 || exit 0 | ||
- name: Save image | ||
run: | | ||
docker image save ejabberd/ecs:latest --output ejabberd-latest.tar | ||
- name: Upload image | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ejabberd-image | ||
path: ejabberd-latest.tar | ||
|
||
- run: | | ||
echo "::notice::To get this image, download ejabberd-image.zip, "\ | ||
"uncompress it and run: " \ | ||
"docker image load -i ejabberd-latest.tar" |
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