Skip to content

Workflow file for this run

name: Build latest staging images
on:
push:
branches:
- dev
- dev-build-images
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
name: Run Go Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: Run Go Tests
run: go test ./...
docker:
name: Build images
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- image: sensorbucket/httpimporter
dockerfile: services/httpimporter/Dockerfile
context: .
- image: sensorbucket/core
dockerfile: services/core/Dockerfile
context: .
- image: sensorbucket/tracing
dockerfile: services/tracing/Dockerfile
context: .
- image: sensorbucket/dashboard
dockerfile: services/dashboard/Dockerfile
context: .
- image: sensorbucket/fission-user-workers
dockerfile: services/fission-user-workers/Dockerfile
context: .
- image: sensorbucket/fission-rmq-connector
dockerfile: services/fission-rmq-connector/Dockerfile
context: .
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ matrix.image }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}