|
a |
|
b/.github/workflows/ci-docker.yml |
|
|
1 |
name: ci-docker |
|
|
2 |
on: |
|
|
3 |
schedule: |
|
|
4 |
- cron: "30 6 * * *" |
|
|
5 |
push: |
|
|
6 |
tags: |
|
|
7 |
- 'v[0-9]+.[0-9]+.[0-9]+' |
|
|
8 |
workflow_dispatch: |
|
|
9 |
|
|
|
10 |
jobs: |
|
|
11 |
docker: |
|
|
12 |
runs-on: ubuntu-latest |
|
|
13 |
steps: |
|
|
14 |
- |
|
|
15 |
name: Checkout |
|
|
16 |
uses: actions/checkout@v4 |
|
|
17 |
- |
|
|
18 |
name: Docker meta |
|
|
19 |
id: meta |
|
|
20 |
uses: docker/metadata-action@v5 |
|
|
21 |
with: |
|
|
22 |
images: antsx/antspy |
|
|
23 |
- |
|
|
24 |
name: Login to DockerHub |
|
|
25 |
if: ${{ github.repository == 'ANTsX/ANTsPy' }} |
|
|
26 |
uses: docker/login-action@v3 |
|
|
27 |
with: |
|
|
28 |
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
|
29 |
password: ${{ secrets.DOCKERHUB_TOKEN }} |
|
|
30 |
- |
|
|
31 |
name: Set up QEMU |
|
|
32 |
uses: docker/setup-qemu-action@v3 |
|
|
33 |
- |
|
|
34 |
name: Set up Docker Buildx |
|
|
35 |
id: buildx |
|
|
36 |
uses: docker/setup-buildx-action@v3 |
|
|
37 |
- |
|
|
38 |
name: Build and push |
|
|
39 |
uses: docker/build-push-action@v6 |
|
|
40 |
with: |
|
|
41 |
context: . |
|
|
42 |
platforms: linux/amd64 |
|
|
43 |
push: ${{ github.repository == 'ANTsX/ANTsPy' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }} |
|
|
44 |
tags: ${{ github.event_name == 'schedule' && 'antsx/antspy:nightly,antsx/antspy:latest' || steps.meta.outputs.tags }} |
|
|
45 |
labels: ${{ steps.meta.outputs.labels }} |