forked from nikizadehgfdl/MOM6_OBGC_examples
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.44 KB
/
mom6_obgc_1d.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Continuous Delivery of mom6_obgc_1d Container
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
deploy:
name: mom6_obgc 1d CI/CD Workflow
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
# - uses: jitterbit/get-changed-files@v1
# id: abc
# with:
# format: space-delimited
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Login to DockerHub Registry
# run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build Docker Image
run: |
echo "maximize disk space on git-runner ..."
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
echo "docker image build ..."
docker build --file "./tests/Dockerfile.ci" -t mom6_obgc_1d:develop .
- name: Check Docker Image
run: |
docker images
if [[ $(docker image inspect mom6_obgc_1d:develop) ]]; then
echo "mom6_obgc_1d:develop generated ..."
else
echo "mom6_obgc_1d:develop was not generated ..."
exit 1
fi
# - name: Docker Logout
# run: |
# docker logout