Skip to content

Docker Image Build

Docker Image Build #38

Workflow file for this run

name: Docker Image Build
on:
workflow_dispatch:
inputs:
image_version:
description: 'The version of the Docker image'
required: true
jobs:
build-api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setting up job
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build API Image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/api/Dockerfile
tags: ghcr.io/${{ env.REPO }}/bahcleplayer-api:${{ github.event.inputs.image_version }},ghcr.io/${{ env.REPO }}/bahcleplayer-api:latest
push: 'true'
build-valkey:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setting up job
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build API Image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/valkey/Dockerfile
tags: ghcr.io/${{ env.REPO }}/bahcleplayer-valkey:${{ github.event.inputs.image_version }},ghcr.io/${{ env.REPO }}/bahcleplayer-valkey:latest
push: 'true'
build-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setting up job
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Client Image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/client/Dockerfile
tags: ghcr.io/${{ env.REPO }}/bahcleplayer-client:${{ github.event.inputs.image_version }},ghcr.io/${{ env.REPO }}/bahcleplayer-client:latest
push: 'true'
finalize:
needs: [build-api, build-client, build-valkey]
runs-on: ubuntu-latest
steps:
- name: Pushing tag
uses: mathieudutour/github-tag-action@v6.2
with:
tag_prefix: ""
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ inputs.image_version }}