Skip to content

fix: Use embedded config file #28

fix: Use embedded config file

fix: Use embedded config file #28

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: build
# Controls when the workflow will run
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'dev'
- 'v*.*.*'
- 'wip-github-actions'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
- 'dev'
- 'v*.*.*'
- 'wip-github-actions'
permissions:
contents: read
packages: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-fern-reporter:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
- linux/arm64/v8
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Tests
run: |
go mod tidy
# go test -v ./...
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Dockerhub
# if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.FERN_DOCKER_USER }}
password: ${{ secrets.FERN_DOCKER_PASSWORD }}
- name: Docker meta
id: meta_fern_reporter
uses: docker/metadata-action@v5
with:
images: |
anoop2811/fern-reporter
tags: |
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
- name: Build and push
uses: docker/build-push-action@v5
with:
# outputs: "type=registry,push=true"
# push: ${{ github.event_name != 'pull_request' }}
push: true
# context: .
platforms: ${{ matrix.platform }}
# platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
# tags: ${{ steps.meta_fern_reporter.outputs.tags }}
tags: anoop2811/fern-reporter:latest
# labels: ${{ steps.meta_fern_reporter.outputs.labels }}