Skip to content

Commit

Permalink
V2/docker image (#107)
Browse files Browse the repository at this point in the history
* Add the docker image
  • Loading branch information
EmadMokhtar authored Apr 21, 2024
1 parent bb27fdc commit bec3d28
Show file tree
Hide file tree
Showing 25 changed files with 164 additions and 519 deletions.
Empty file added .env
Empty file.
34 changes: 34 additions & 0 deletions .github/workflows/docker-hub-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker

on:
push:
tags:
- 'v*'

env:
IMAGE_NAME: tafseer_api

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
1 change: 1 addition & 0 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- main
- v2/master
pull_request:

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- master
- main
- v2/master
pull_request:

permissions:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/semver-lable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Semantic Versioning Label

on:
push:
branches:
- v2/master

jobs:
semver_tag_from_pr:
# permissions required to find PR for last commit and push the new tag
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0" # we need full git-history to determine the last semVer tag
ssh-key: ${{ secrets.semver_github_action }}
- name: bump semVer
uses: simontheleg/semver-tag-from-pr-action@v1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
repo_ssh_key: ${{ secrets.SEMVER_GITHUB_ACTION_PRIVATE }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,5 @@ Temporary Items

# End of https://www.toptal.com/developers/gitignore/api/goland,go,macos

### Project ###

config.yaml
# Project
.env
10 changes: 0 additions & 10 deletions .idea/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/ChatGPTCopilotChannelManager.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/dataSources.xml

This file was deleted.

Loading

0 comments on commit bec3d28

Please sign in to comment.