Skip to content

Merge pull request #188 from atlanticwave-sdx/enable-save-log-to-file #28

Merge pull request #188 from atlanticwave-sdx/enable-save-log-to-file

Merge pull request #188 from atlanticwave-sdx/enable-save-log-to-file #28

Workflow file for this run

# A workflow to build and publish sdx-controllera container images.
# See https://docs.docker.com/build/ci/github-actions/.
name: Container images
on:
push:
branches:
- "main"
tags:
- "*"
# Triggering the build/publish of container images on pull
# requests should be here only for testing, keep "pull_request"
# disabled.
# pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Collect metadata for container image tags
# See https://github.com/docker/metadata-action
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
awsdx/sdx-controller
awsdx/bapm-server
# ghcr.io/username/app
# generate Docker tags based on the following events/attributes
tags: |
type=pep440,pattern={{version}}
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
# Secrets used here are set under "repository secrets" at
# https://github.com/atlanticwave-sdx/sdx-controller/settings/secrets/actions,
#
# # See https://github.com/docker/login-action.
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Buildx is a Docker CLI plugin for extended build capabilities
# with BuildKit.
#
# See https://github.com/docker/setup-buildx-action.
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# See https://github.com/docker/build-push-action
- name: Build and push sdx-controller
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: |
awsdx/sdx-controller:latest
awsdx/sdx-controller:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
# See https://github.com/docker/build-push-action
- name: Build and push bapm-server
uses: docker/build-push-action@v4
with:
context: ./bapm_server
file: ./bapm_server/Dockerfile
push: true
tags: |
awsdx/bapm-server:latest
awsdx/bapm-server:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}