-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.52 KB
/
windmill-gdal.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
55
56
name: Build and publish windmill-gdal docker image
on:
push:
paths:
- workers/gdal/**
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@master
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build and publish latest docker image
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: sourcepole/windmill-gdal
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
tags: latest
workdir: workers/gdal/
- name: Check whether version file has changed
uses: dorny/paths-filter@v2
id: paths_filter
with:
base: ${{ github.ref }}
filters: |
gdal_version:
- 'workers/gdal/version.txt'
- name: Get version tag from file
id: get_tag
if: steps.paths_filter.outputs.gdal_version == 'true'
run: |
version_tag=$(cat workers/gdal/version.txt || echo 'latest')
echo "Read version file: $version_tag"
echo "tag=$version_tag" >>$GITHUB_OUTPUT
- name: Build and publish tagged docker image
uses: elgohr/Publish-Docker-Github-Action@v4
if: steps.paths_filter.outputs.gdal_version == 'true'
with:
name: sourcepole/windmill-gdal
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
tags: ${{ steps.get_tag.outputs.tag }}
workdir: workers/gdal/