File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Push development image
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ pr :
7+ description : ' PR number (if set, ignores branch above)'
8+ required : false
9+ type : string
10+ tag :
11+ description : ' Docker image tag'
12+ required : true
13+ default : ' prod'
14+
15+ jobs :
16+ dev :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - uses : actions/checkout@v4
21+ if : ${{ github.event.inputs.pr == 0 }}
22+
23+ - uses : actions/checkout@v4
24+ if : ${{ github.event.inputs.pr != 0 }}
25+ with :
26+ ref : ${{ format('refs/pull/{0}/head', github.event.inputs.pr) }}
27+
28+ - name : Login to Docker Hub
29+ run : echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
30+ continue-on-error : true
31+
32+ - name : Build and push development image
33+ uses : docker/build-push-action@v6
34+ with :
35+ context : .
36+ push : true
37+ tags : metabrainz/synapse:${{ github.event.inputs.tag }}
38+ build-args : GIT_COMMIT_SHA=${{ github.sha }}
You can’t perform that action at this time.
0 commit comments