Skip to content

build-all-images

build-all-images #12

name: build-all-images
on:
workflow_dispatch:
env:
ENV_ID: ${{ secrets.DEV_ENV_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_REGISTRY: ghcr.io
jobs:
rule:
name: rule
runs-on: ubuntu-latest
env:
SERVICE_NAME: rule
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
balance_by_account:
name: balance-by-account
runs-on: ubuntu-latest
env:
SERVICE_NAME: balance-by-account
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
graphql:
name: graphql
runs-on: ubuntu-latest
env:
SERVICE_NAME: graphql
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
request_create:
name: request-create
runs-on: ubuntu-latest
env:
SERVICE_NAME: request-create
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
request_approve:
name: request-approve
runs-on: ubuntu-latest
env:
SERVICE_NAME: request-approve
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
request_by_id:
name: request-by-id
runs-on: ubuntu-latest
env:
SERVICE_NAME: request-by-id
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
requests_by_account:
name: requests-by-account
runs-on: ubuntu-latest
env:
SERVICE_NAME: requests-by-account
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
transaction_by_id:
name: transaction-by-id
runs-on: ubuntu-latest
env:
SERVICE_NAME: transaction-by-id
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
transactions_by_account:
name: transactions-by-account
runs-on: ubuntu-latest
env:
SERVICE_NAME: transactions-by-account
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
event:
name: event
runs-on: ubuntu-latest
env:
SERVICE_NAME: event
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
measure:
name: measure
runs-on: ubuntu-latest
env:
SERVICE_NAME: measure
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
auto_confirm:
name: auto-confirm
runs-on: ubuntu-latest
env:
SERVICE_NAME: auto-confirm
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx .
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
go_migrate:
name: go-migrate
runs-on: ubuntu-latest
env:
SERVICE_NAME: go-migrate
steps:
- uses: actions/checkout@v4
- name: build image
run: bash scripts/build-image-job.sh --service-name $SERVICE_NAME --build-ctx ./migrations/go-migrate # non root build context
- name: tag image
run: docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest
- name: log into container registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push image
run: docker push ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:latest