forked from inbo/protocolsource
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 905 Bytes
/
Copy pathdocker.yml
File metadata and controls
31 lines (28 loc) · 905 Bytes
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
name: On push to main add a tag to the commit if docker or renv stuff changed
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Tag in case renv or docker files changed
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v41
with:
files: |
Dockerfile
docker
renv.lock
- name: Create docker git tag if any of the files changed
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
git config --global user.email "info@inbo.be"
git config --global user.name "inbo"
git tag -a docker-${{ github.sha }} -m "new docker image"
git push --follow-tags