-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The bare minimum to run the docker stuff.
- Loading branch information
1 parent
c22e6b0
commit 4ae2e29
Showing
1 changed file
with
58 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,58 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**/*.md' | ||
workflow_dispatch: | ||
schedule: | ||
# Once in week 3:33 on Sunday (0 and 7 are Sunday) | ||
- cron: '33 3 * * 0' | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs | ||
concurrency: | ||
group: pep-build-${{ github.event.pull_request.head.label || github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pep-build: | ||
runs-on: ubuntu-latest | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install docker-compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
dver=$(docker-compose version) | ||
echo "$dver" | ||
echo "$dver" >> $GITHUB_STEP_SUMMARY | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: 'PelionIoT/factory-tool' | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
path: 'fcu_config' | ||
- name: Build | ||
run: docker-compose build --build-arg fcu_config=fcu_config | ||
- name: Start the docker | ||
run: | ||
docker-compose up | ||
- name: Check the processes | ||
run: | | ||
procs=$(docker-compose ps) | ||
echo "# docker-compose ps:" >> $GITHUB_STEP_SUMMARY | ||
echo $procs >> $GITHUB_STEP_SUMMARY | ||
- name: Get the logs | ||
run: | | ||
logs=$(docker-compose logs) | ||
echo "# docker-compose logs:" >> $GITHUB_STEP_SUMMARY | ||
echo $logs >> $GITHUB_STEP_SUMMARY | ||
- name: Inspect mongo db volume | ||
run: | | ||
mong=$(docker volume inspect pelion-edge-provisioner_mongo_data) | ||
echo "# docker volume inspect pelion-edge-provisioner_mongo_data:" >> $GITHUB_STEP_SUMMARY | ||
echo $mong >> $GITHUB_STEP_SUMMARY | ||
- name: Stop the container | ||
run: docker-compose down | ||
|