-
Notifications
You must be signed in to change notification settings - Fork 57
47 lines (36 loc) · 1.38 KB
/
Yearly-model-mohidland.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
name: Model - Mohid Land - Yearly
on:
# schedule:
# - cron: '0 0 1 1 *'
workflow_dispatch: # Permite execução manual do workflow
env:
TAG: 24.11
REPOSITORY: mohid-water-modelling-system
DOCKER_IMAGE_NAME: model/mohidland
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Read Image NAME
run: echo "The Docker image name is $IMAGE_NAME"
- name: Use Docker image name
run: echo "The Docker image name is $DOCKER_IMAGE_NAME"
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v4
- name: Log into registry ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v3 # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Solutions/dockers/MohidLand/dockerfile --tag ghcr.io/${{ env.REPOSITORY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ env.TAG }}
- name: Push Docker image to GitHub Container Registry
run: docker push ghcr.io/${{ env.REPOSITORY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ env.TAG }}