Skip to content

Rework integration test container #11

Rework integration test container

Rework integration test container #11

Workflow file for this run

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.1
IMAGE_NAME: kamforka/thehive4py-integrator
steps:
- uses: actions/checkout@v4
- name: Set variables
id: variables
run: |
echo "IMAGE_FULLNAME=$IMAGE_NAME:thehive-$THEHIVE_VERSION" >> "$GITHUB_OUTPUT"
echo "IMAGE_FULLNAME_WITH_HASH=$IMAGE_NAME:thehive-$THEHIVE_VERSION-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Build image
run: |
docker build -t ${{ steps.variables.outputs.IMAGE_FULLNAME }} docker/thehive4py-integrator
docker build -t ${{ steps.variables.outputs.IMAGE_FULLNAME_WITH_HASH }} docker/thehive4py-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 }}