Skip to content

build-all-images

build-all-images #16

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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME
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 with current short sha and latest
run: |
docker tag $SERVICE_NAME:latest ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME:${GITHUB_SHA:0:7}
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 images
run: docker push --all-tags ${{ env.GITHUB_REGISTRY }}/${{ github.repository }}/$SERVICE_NAME