Skip to content

Commit

Permalink
Create docker-client-linux.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-dupdyke authored Jan 8, 2025
1 parent 0d3c7d7 commit 729c981
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create Linux Container

on:
workflow_dispatch:
branches: [ main ]
release:
types: [ "published" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Extract tag name # Extract tag name based on event type
id: tag_name
run: |
if [[ $GITHUB_EVENT_NAME == 'release' ]]; then
echo "tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
else
echo "tag=latest" >> $GITHUB_ENV
fi
shell: bash

- name: Login to dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
tags: |
dustinupdyke/ghosts-client-linux:${{ env.tag }}
dustinupdyke/ghosts-client-linux:latest
push: true
context: src/.
file: ./src/Dockerfile-linux-client

0 comments on commit 729c981

Please sign in to comment.