Skip to content

v0.4.4

v0.4.4 #10

Workflow file for this run

name: Deploy Builds
on:
release:
types: [ released ]
push:
tags:
# v0.X.Y pre-release tags
- 'v0.*.*a*'
- 'v0.*.*b*'
- 'v0.*.*rc*'
jobs:
test:
uses: ./.github/workflows/pytest.yml
docker:
name: build and deploy docker images
needs: test
runs-on: ubuntu-latest
steps:
# Fetch all history for all tags and branches
- name: clone socs
uses: actions/checkout@v4
with:
fetch-depth: 0
# Dockerize
- name: Build docker images
run: |
docker-compose build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push official docker image
env:
DOCKERHUB_ORG: "simonsobs"
run: |
export DOCKER_TAG=`git describe --tags --always`
# Tag all images for upload to the registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:latest
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
# Upload to docker registry
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:latest
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:${DOCKER_TAG}
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} echo ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} pushed
wheel:
name: build and deploy to PyPI
needs: test
runs-on: ubuntu-latest
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: clone socs
uses: actions/checkout@v4
- name: install build dependencies
run: |
python3 -m pip install --upgrade build twine
- name: build wheel
run: |
python3 -m build
- name: install wheel
run: |
python3 -m pip install dist/socs*.whl
- name: install requirements for testing
run: |
pip3 install -r requirements.txt
- name: Run unit tests
working-directory: ./tests
run: |
python3 -m pytest -m 'not integtest'
- name: upload to PyPI
run: |
python3 -m twine upload dist/*