Skip to content

Commit 478360d

Browse files
authored
fix: Re-enable build and publish of Docker Image (#263)
* fix: update `Dockerfile` to use Python 3.10 Signed-off-by: Paul Horton <phorton@sonatype.com> * ci: renable publishing of Docker Images Signed-off-by: Paul Horton <phorton@sonatype.com>
1 parent 31fdd93 commit 478360d

File tree

2 files changed

+18
-21
lines changed

2 files changed

+18
-21
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,20 @@ jobs:
5454
github_token: ${{ secrets.GITHUB_TOKEN }}
5555
pypi_token: ${{ secrets.PYPI_TOKEN }}
5656

57-
# - name: Package release
58-
# id: package_release
59-
# env:
60-
# REPO: cyclonedx/cyclonedx-python
61-
# run: |
62-
# VERSION=`cat VERSION`
63-
# echo "##[set-output name=version;]$VERSION"
64-
# python setup.py sdist bdist_wheel
65-
# docker build -f Dockerfile --build-arg VERSION=$VERSION -t $REPO:$VERSION -t $REPO:latest .
57+
- name: Build Docker Image
58+
id: package_release
59+
env:
60+
REPO: cyclonedx/cyclonedx-python
61+
run: |
62+
VERSION=`poetry version -s`
63+
docker build -f Dockerfile --build-arg VERSION=$VERSION -t $REPO:$VERSION -t $REPO:latest .
6664
67-
#
68-
# - name: Publish docker image
69-
# env:
70-
# REPO: cyclonedx/cyclonedx-python
71-
# DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
72-
# run: |
73-
# VERSION=`cat VERSION`
74-
# docker login --username coderpatros --password "$DOCKER_TOKEN"
75-
# docker push $REPO:latest
76-
# docker push $REPO:${{ steps.package_release.outputs.version }}
65+
- name: Publish Docker Image(s)
66+
env:
67+
REPO: cyclonedx/cyclonedx-python
68+
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
69+
run: |
70+
VERSION=`poetry version -s`
71+
docker login --username coderpatros --password "$DOCKER_TOKEN"
72+
docker push $REPO:latest
73+
docker push $REPO:$VERSION

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM python:3.9.7-slim-buster
1+
FROM python:3.10-slim-buster
22

33
ARG VERSION
44

55
COPY ./dist /tmp/dist
66
RUN pip install cyclonedx-bom==${VERSION} --find-links file:///tmp/dist
7-
ENTRYPOINT ["cyclonedx-py"]
7+
ENTRYPOINT ["cyclonedx-bom"]

0 commit comments

Comments
 (0)