Skip to content

codefi list for former lists #810

codefi list for former lists

codefi list for former lists #810

Workflow file for this run

name: CI v2
on:
push:
branches:
release:
types: [published]
jobs:
build_datapi:
name: Build & Test Datapi
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Build package
run: go build .
- name: Install docx-mailmerge
run: |
python3 -m pip install --upgrade pip
python3 -m pip install docx-mailmerge
- name: Unit Tests
run: go test ./... -v
- name: Integration Tests
run: go test -tags=integration ./... -v -failfast
container_datapi:
name: Push Datapi container
needs: build_datapi
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Prepare container sources & resources
shell: bash
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
cp ./datapi ./build-container
cp -r ./migrations ./build-container
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
flavor: |
latest=true
- name: Login to GitHub Container Registry
id: login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./build-container
# push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}