File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create Linux Container
2+
3+ on :
4+ workflow_dispatch :
5+ branches : [ main ]
6+ release :
7+ types : [ "published" ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : Extract tag name # Extract tag name based on event type
16+ id : tag_name
17+ run : |
18+ if [[ $GITHUB_EVENT_NAME == 'release' ]]; then
19+ echo "tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
20+ else
21+ echo "tag=latest" >> $GITHUB_ENV
22+ fi
23+ shell : bash
24+
25+ - name : Login to dockerhub
26+ uses : docker/login-action@v1
27+ with :
28+ username : ${{ secrets.DOCKERHUB_USERNAME }}
29+ password : ${{ secrets.DOCKERHUB_TOKEN }}
30+
31+ - name : Build and push Docker images
32+ uses : docker/build-push-action@v2
33+ with :
34+ tags : |
35+ dustinupdyke/ghosts-client-linux:${{ env.tag }}
36+ dustinupdyke/ghosts-client-linux:latest
37+ push : true
38+ context : src/.
39+ file : ./src/Dockerfile-linux-client
You can’t perform that action at this time.
0 commit comments