Skip to content

Commit

Permalink
Merge pull request #185 from Duke-GCB/fabricebrito-patch-5
Browse files Browse the repository at this point in the history
Update package.yaml
  • Loading branch information
fabricebrito authored Dec 13, 2024
2 parents 0695b69 + d11a9c3 commit 82c4506
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,33 @@ jobs:
run: |
# python -m pip install --upgrade pip
pip install hatch
- name: Build package
run: hatch build

- name: Test package
run: hatch -e test run nose2 --verbose

- name: Publish package distributions to Test PyPI
env:
HATCH_INDEX_USER: __token__ # Use '__token__' as the username
HATCH_INDEX_AUTH: ${{ secrets.PYPI_APIKEY }} # PyPI API token stored as a secret
if: github.ref != 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
repository-url: https://test.pypi.org/legacy/
- name: Publish package distributions to PyPI
if: github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
repository-url: https://upload.pypi.org/legacy/
container-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo version ${{needs.version.outputs.app-version}}
- run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: build & push image
run: |
hatch build
hatch publish
version=$( cat calrissian/__about__.py | cut -d "=" -f 2 | tr -d '"' )
IMAGE_ID=ghcr.io/duke-gcb/calrissian/calrissian
docker build . --file Dockerfile --tag calrissian
docker tag calrissian $IMAGE_ID:$version
docker push $IMAGE_ID:$version

0 comments on commit 82c4506

Please sign in to comment.