Skip to content

Commit 82c4506

Browse files
authored
Merge pull request #185 from Duke-GCB/fabricebrito-patch-5
Update package.yaml
2 parents 0695b69 + d11a9c3 commit 82c4506

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/package.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,33 @@ jobs:
2727
run: |
2828
# python -m pip install --upgrade pip
2929
pip install hatch
30-
3130
- name: Build package
3231
run: hatch build
33-
3432
- name: Test package
3533
run: hatch -e test run nose2 --verbose
36-
3734
- name: Publish package distributions to Test PyPI
38-
env:
39-
HATCH_INDEX_USER: __token__ # Use '__token__' as the username
40-
HATCH_INDEX_AUTH: ${{ secrets.PYPI_APIKEY }} # PyPI API token stored as a secret
35+
if: github.ref != 'refs/heads/master'
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
skip-existing: true
39+
repository-url: https://test.pypi.org/legacy/
40+
- name: Publish package distributions to PyPI
41+
if: github.ref == 'refs/heads/master'
42+
uses: pypa/gh-action-pypi-publish@release/v1
43+
with:
44+
skip-existing: true
45+
repository-url: https://upload.pypi.org/legacy/
46+
container-build:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- run: echo version ${{needs.version.outputs.app-version}}
51+
- run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
52+
- name: build & push image
4153
run: |
42-
hatch build
43-
hatch publish
54+
version=$( cat calrissian/__about__.py | cut -d "=" -f 2 | tr -d '"' )
55+
IMAGE_ID=ghcr.io/duke-gcb/calrissian/calrissian
56+
docker build . --file Dockerfile --tag calrissian
57+
docker tag calrissian $IMAGE_ID:$version
58+
docker push $IMAGE_ID:$version
59+

0 commit comments

Comments
 (0)