Skip to content

Update docker pull badge colors #13

Update docker pull badge colors

Update docker pull badge colors #13

name: Publish Docker Images
on:
push:
branches:
- main
tags:
- "v*"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Determine Version
id: version
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "VERSION=latest" >> $GITHUB_ENV
fi
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_API_KEY }}
- name: Build and Push Web Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/chipper:web-${{ env.VERSION }} services/web
docker push ${{ secrets.DOCKER_USERNAME }}/chipper:web-${{ env.VERSION }}
- name: Build and Push API Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/chipper:api-${{ env.VERSION }} services/api
docker push ${{ secrets.DOCKER_USERNAME }}/chipper:api-${{ env.VERSION }}
- name: Build and Push CLI Tool Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/chipper:cli-${{ env.VERSION }} tools/cli
docker push ${{ secrets.DOCKER_USERNAME }}/chipper:cli-${{ env.VERSION }}
- name: Build and Push Embed Tool Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/chipper:embed-${{ env.VERSION }} tools/embed
docker push ${{ secrets.DOCKER_USERNAME }}/chipper:embed-${{ env.VERSION }}
- name: Build and Push Scrape Tool Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/chipper:scrape-${{ env.VERSION }} tools/scrape
docker push ${{ secrets.DOCKER_USERNAME }}/chipper:scrape-${{ env.VERSION }}
# To save resources, we should not build and push the transcription every time.
# TODO: Figure out a strategy how to manage the transcribe tool image.
# - name: Build and Push Transcribe Tool Image
# run: |
# docker build -t ${{ secrets.DOCKER_USERNAME }}/chipper:transcribe-${{ env.VERSION }} tools/transcribe
# docker push ${{ secrets.DOCKER_USERNAME }}/chipper:transcribe-${{ env.VERSION }}