Skip to content

Commit 729c981

Browse files
authored
Create docker-client-linux.yml
1 parent 0d3c7d7 commit 729c981

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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

0 commit comments

Comments
 (0)