add init files for tests and coverage #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Docker Build | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Get branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Get branch tag | |
shell: bash | |
run: | | |
BRANCH_NAME="$( echo "${{ steps.extract_branch.outputs.branch }}" | sed "s/[^[:alnum:].-]/-/g" )" | |
echo "tag=$BRANCH_NAME" >> $GITHUB_OUTPUT | |
id: sanitize_branch | |
- name: Build container | |
run: | | |
docker build -f Dockerfile -t taleweave-ai . | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push container | |
run: | | |
docker tag taleweave-ai apextoaster/taleweave-ai:${{ steps.sanitize_branch.outputs.tag }} | |
docker push apextoaster/taleweave-ai:${{ steps.sanitize_branch.outputs.tag }} |