chore: Update build workflow to promote gateway images on release #27
Workflow file for this run
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
on: | |
push: | |
# branches: | |
# - main | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ghcr.io/akdasa-studios/lectorium-gateway | |
IMAGE_TAG: ${{ github.sha }} | |
jobs: | |
version: | |
name: Get Next Version | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Get next version | |
id: get_next_version | |
uses: thenativeweb/get-next-version@main | |
with: | |
prefix: "v" | |
outputs: | |
version: ${{ steps.get_next_version.outputs.version }} | |
build-gateway: | |
name: Build Gateway | |
runs-on: ubuntu-latest | |
needs: version | |
environment: Staging | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log into registry ${{ env.REGISTRY }} | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./modules/services/gateway | |
push: true | |
tags: | | |
ghcr.io/akdasa-studios/lectorium-gateway:${{ needs.version.outputs.version }}-rc | |
# build-database: | |
# name: Build Database | |
# runs-on: ubuntu-latest | |
# environment: Staging | |
# permissions: | |
# contents: read | |
# packages: write | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# with: | |
# submodules: true | |
# - name: Setup Docker buildx | |
# uses: docker/setup-buildx-action@v2 | |
# - name: Log into registry ${{ env.REGISTRY }} | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ${{ env.REGISTRY }} | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Build and push Docker image | |
# uses: docker/build-push-action@v4 | |
# with: | |
# context: ./modules/services/database/modules/database | |
# push: true | |
# tags: | | |
# ghcr.io/akdasa-studios/lectorium-database:staging | |
# build-database-bootstrap: | |
# name: Build Database Bootstrap | |
# runs-on: ubuntu-latest | |
# environment: Staging | |
# permissions: | |
# contents: read | |
# packages: write | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# with: | |
# submodules: true | |
# - name: Setup Docker buildx | |
# uses: docker/setup-buildx-action@v2 | |
# - name: Log into registry ${{ env.REGISTRY }} | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ${{ env.REGISTRY }} | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Build and push Docker image | |
# uses: docker/build-push-action@v4 | |
# with: | |
# context: ./modules/services/database/modules/bootstrap | |
# push: true | |
# tags: | | |
# ghcr.io/akdasa-studios/lectorium-database-bootstrap:staging |