-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.86 KB
/
galaxy_build.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
57
58
name: Build and Push Docker Image
on: [push]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: test
run: |
python ./utils/python/parse_json.py ./plugin_requirements.json
- name: Get current commit ID
run: echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Get previous commit ID
run: |
PREV_COMMIT_ID=$(git rev-list --max-parents=0 HEAD | head -n 1)
echo "PREV_COMMIT_ID=$PREV_COMMIT_ID" >> $GITHUB_ENV
- name: Check if requirements have changed
id: check_changes
run: |
# Überprüfen Sie, ob sich plugin_requirements.yml geändert hat
dif=
echo $dif
CHANGED=$(git diff HEAD 'plugin_requirements.yml')
if [ -z "$CHANGED" ]; then
else
echo "CHANGED=false" >> $GITHUB_ENV
fi
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: CHANGED==false
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: my-docker-hub-namespace/my-docker-hub-repository
- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: jipodhead/ilohelper-coll:latest
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}