Skip to content

ci: fix YAML indentation and use toLower() for GHCR owner #3

ci: fix YAML indentation and use toLower() for GHCR owner

ci: fix YAML indentation and use toLower() for GHCR owner #3

Workflow file for this run

name: Release Docker Images

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 42, Col: 17): Unrecognized function: 'toLower'. Located at position 1 within expression: toLower(github.repository_owner), (Line: 53, Col: 17): Unrecognized function: 'toLower'. Located at position 1 within expression: toLower(github.repository_owner), (Line: 64, Col: 17): Unrecognized function: 'toLower'. Located at position 1 within expression: toLower(github.repository_owner), (Line: 75, Col: 17): Unrecognized function: 'toLower'. Located at position 1 within expression: toLower(github.repository_owner)
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: Build and push API image
uses: docker/build-push-action@v5
with:
context: .
file: tweetpulse-pipeline/Dockerfile.api
push: true
tags: |
ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-api:latest
ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-api:${{ steps.vars.outputs.version }}
ghcr.io/${{ toLower(github.repository_owner) }}/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/${{ toLower(github.repository_owner) }}/tweetpulse-producer:latest
ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-producer:${{ steps.vars.outputs.version }}
ghcr.io/${{ toLower(github.repository_owner) }}/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/${{ toLower(github.repository_owner) }}/tweetpulse-consumer:latest
ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-consumer:${{ steps.vars.outputs.version }}
ghcr.io/${{ toLower(github.repository_owner) }}/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/${{ toLower(github.repository_owner) }}/tweetpulse-dashboard:latest
ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-dashboard:${{ steps.vars.outputs.version }}
ghcr.io/${{ toLower(github.repository_owner) }}/tweetpulse-dashboard:${{ steps.vars.outputs.tag }}