Skip to content

TweetPulse Pro v0.1.1 #4

TweetPulse Pro v0.1.1

TweetPulse Pro v0.1.1 #4

Workflow file for this run

name: Release Docker Images
on:
release:
types: [published]
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version
id: vars
shell: bash
run: |
TAG=${GITHUB_REF_NAME}
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Compute lowercase owner
id: owner
shell: bash
run: |
echo "OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
- name: Build and push API image
uses: docker/build-push-action@v5
with:
context: .
file: tweetpulse-pipeline/Dockerfile.api
push: true
tags: |
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-api:latest
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-api:${{ steps.vars.outputs.version }}
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-api:${{ steps.vars.outputs.tag }}
- name: Build and push Producer image
uses: docker/build-push-action@v5
with:
context: .
file: tweetpulse-pipeline/Dockerfile.producer
push: true
tags: |
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-producer:latest
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-producer:${{ steps.vars.outputs.version }}
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-producer:${{ steps.vars.outputs.tag }}
- name: Build and push Consumer image
uses: docker/build-push-action@v5
with:
context: .
file: tweetpulse-pipeline/Dockerfile.consumer
push: true
tags: |
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-consumer:latest
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-consumer:${{ steps.vars.outputs.version }}
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-consumer:${{ steps.vars.outputs.tag }}
- name: Build and push Dashboard image
uses: docker/build-push-action@v5
with:
context: .
file: tweetpulse-dashboard/Dockerfile.dashboard
push: true
tags: |
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-dashboard:latest
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-dashboard:${{ steps.vars.outputs.version }}
ghcr.io/${{ env.OWNER_LC }}/tweetpulse-dashboard:${{ steps.vars.outputs.tag }}