Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build devtasker docker image

on:
pull_request:
branches:
- master
paths-ignore:
- '*.md'
- .gitignore
- '**/docs/**'
push:
branches:
- master
- '**/ci**'
paths-ignore:
- '*.md'
- .gitignore
- '**/docs/**'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Docker Hub Authentication
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Generate Docker tag
id: tag
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "tag=latest" >> $GITHUB_OUTPUT
else
echo "tag=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
fi

- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ steps.tag.outputs.tag }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ These are things that I want to implement here.
- [ ] Unit Testing
- [x] Monitoring (prometheus)
- [x] Docker
- [x] CI/CD
- [ ] GraphQL API
- [ ] gRPC Layer