-
Notifications
You must be signed in to change notification settings - Fork 144
52 lines (48 loc) · 1.58 KB
/
integrator.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
name: integrator-image
on:
push:
branches:
- main
pull_request:
jobs:
changes:
name: Change detection
runs-on: ubuntu-latest
outputs:
integrator: ${{ steps.filter.outputs.integrator }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
integrator:
- 'docker/thehive4py-integrator/**'
build:
name: Build and push
needs: changes
if: ${{ needs.changes.outputs.integrator == 'true' }}
runs-on: ubuntu-latest
env:
THEHIVE_VERSION: 5.3.0
IMAGE_NAME: kamforka/thehive4py-integrator
steps:
- uses: actions/checkout@v4
- name: Set variables
id: variables
run: |
echo "image_fullname=${{ env.IMAGE_NAME }}:thehive-${{ env.THEHIVE_VERSION }}" >> "$GITHUB_OUTPUT"
echo "image_fullname_with_hash=${{ env.IMAGE_NAME }}:thehive-${{ env.THEHIVE_VERSION }}-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Build image
run: |
echo ${{ steps.variables.image_fullname }}
exit 0
# docker build -t ${{ steps.variables.IMAGE_FULLNAME }} docker/thehive4-py-integrator
# docker build -t ${{ needs.variables.IMAGE_FULLNAME_WITH_HASH }} docker/thehive4-py-integrator
# - name: Push image
# # if: ${{ github.ref == 'refs/heads/main' }}
# run: |
# docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
# env:
# DOCKER_USER: ${{ secrets.DOCKER_USER }}
# DOCKER_PASS: ${{ secrets.DOCKER_PASS }}