Skip to content

Commit

Permalink
fix: Re-enable build and publish of Docker Image (#263)
Browse files Browse the repository at this point in the history
* fix: update `Dockerfile` to use Python 3.10

Signed-off-by: Paul Horton <[email protected]>

* ci: renable publishing of Docker Images

Signed-off-by: Paul Horton <[email protected]>
  • Loading branch information
madpah authored Nov 23, 2021
1 parent 31fdd93 commit 478360d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,20 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}

# - name: Package release
# id: package_release
# env:
# REPO: cyclonedx/cyclonedx-python
# run: |
# VERSION=`cat VERSION`
# echo "##[set-output name=version;]$VERSION"
# python setup.py sdist bdist_wheel
# docker build -f Dockerfile --build-arg VERSION=$VERSION -t $REPO:$VERSION -t $REPO:latest .
- name: Build Docker Image
id: package_release
env:
REPO: cyclonedx/cyclonedx-python
run: |
VERSION=`poetry version -s`
docker build -f Dockerfile --build-arg VERSION=$VERSION -t $REPO:$VERSION -t $REPO:latest .
#
# - name: Publish docker image
# env:
# REPO: cyclonedx/cyclonedx-python
# DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
# run: |
# VERSION=`cat VERSION`
# docker login --username coderpatros --password "$DOCKER_TOKEN"
# docker push $REPO:latest
# docker push $REPO:${{ steps.package_release.outputs.version }}
- name: Publish Docker Image(s)
env:
REPO: cyclonedx/cyclonedx-python
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
run: |
VERSION=`poetry version -s`
docker login --username coderpatros --password "$DOCKER_TOKEN"
docker push $REPO:latest
docker push $REPO:$VERSION
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.9.7-slim-buster
FROM python:3.10-slim-buster

ARG VERSION

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

0 comments on commit 478360d

Please sign in to comment.