Skip to content

(fix): Fix Go snippets for optional primitive aliases (#3050) #47

(fix): Fix Go snippets for optional primitive aliases (#3050)

(fix): Fix Go snippets for optional primitive aliases (#3050) #47

Workflow file for this run

name: Build seed containers
on:
push:
branches:
- main
workflow_dispatch:
# Cancel previous workflows on previous push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
python:
- 'docker/seed/Dockerfile.python'
- 'generators/python/poetry.lock'
- '.github/workflows/build-seed.yml'
ts:
- 'docker/seed/Dockerfile.ts'
- '.github/workflows/build-seed.yml'
java:
- 'docker/seed/Dockerfile.java'
- '.github/workflows/build-seed.yml'
build-container:
strategy:
matrix:
# Parse JSON array containing names of all filters matching any of changed files
# e.g. ['package1', 'package2'] if both package folders contains changes
package: ${{ fromJSON(needs.changes.outputs.packages) }}
runs-on: ubuntu-latest
needs: changes
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: fernapi
password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: fernapi/${{ matrix.package }}-seed
tags: |
type=sha
latest
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/seed/Dockerfile.${{ matrix.package }}
push: true
# use short SHA if modded, or just use latest if nothing changed
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}