Skip to content

Commit fb2b6c1

Browse files
committed
chore(ci): Reenable DockerHub pushes
1 parent fe09524 commit fb2b6c1

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Docker
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
tags: ['*']
7+
pull_request:
8+
branches: [main, dev]
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out the repo
24+
uses: actions/checkout@v5
25+
26+
- name: Log in to Docker Hub
27+
if: github.event_name == 'push'
28+
uses: docker/login-action@v3
29+
with:
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_PASSWORD }}
32+
33+
- name: Extract metadata (tags, labels) for Docker
34+
id: meta
35+
uses: docker/metadata-action@v5
36+
with:
37+
images: bids/validator
38+
39+
- name: Build and push Docker image
40+
uses: docker/build-push-action@v6
41+
with:
42+
context: .
43+
push: ${{ startsWith(github.ref, 'refs/tags/') }}
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)