Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI docker image generation #116

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Formatting

on: [push, pull_request]
on: [push, pull_request, release]

jobs:
lint:
Expand All @@ -12,4 +12,4 @@ jobs:
with:
options: "--check --verbose"
- uses: isort/isort-action@master
continue-on-error: true
continue-on-error: true
33 changes: 14 additions & 19 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: Tests

on: [push, pull_request, pull_request_target]
on: [push, pull_request, pull_request_target, release]

jobs:
Test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"

- run: pip install -e ".[dev]"

- run: pytest --cov --cov-append

- uses: coverallsapp/github-action@v2
with:
file: .coverage
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- run: pip install -e ".[dev]"
- run: pytest --cov --cov-append
- uses: coverallsapp/github-action@v2
with:
file: .coverage
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release
on:
release:
types: [created]
workflow_run:
workflows: ["Formatting", "Tests"]
types:
- completed

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
push: false
tags: simonsobs/librarian:${{ github.event.release.tag_name }}