File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 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 }}
You can’t perform that action at this time.
0 commit comments