Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: Publish to PyPI/github
name: Publish

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+[ab]?[0-9]?'
branches:
- master
pull_request:
branches:
- 'master'

jobs:
build-n-publish:
build-n-publish-package:
name: Build and publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -38,3 +44,34 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

build-n-publish-docker:
name: Build and publish to Docker
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: eclecticiq/opentaxii
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion examples/docker-compose-taxii2.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
opentaxii:
image: eclecticiq/opentaxii:latest
image: eclecticiq/opentaxii:${IMAGE_TAG-latest}
environment:
# Required for the CLI commands to use the correct config
OPENTAXII_CONFIG: /opentaxii.yml
Expand Down
4 changes: 2 additions & 2 deletions examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ authdb:
POSTGRES_DB: opentaxii1

opentaxii:
image: eclecticiq/opentaxii
image: eclecticiq/opentaxii:${IMAGE_TAG-latest}
environment:
DOCKER_OPENTAXII_AUTH_SECRET: secret
OPENTAXII_DOMAIN: 192.168.59.103:9000
Expand All @@ -34,7 +34,7 @@ opentaxii:
- authdb:authdb

opentaxii2:
image: eclecticiq/opentaxii
image: eclecticiq/opentaxii:${IMAGE_TAG-latest}
environment:
DOCKER_OPENTAXII_AUTH_SECRET: secrettwo
OPENTAXII_DOMAIN: 192.168.59.103
Expand Down
Loading