Skip to content

fix: Use the default docker registry #10

fix: Use the default docker registry

fix: Use the default docker registry #10

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Docker Builds
# 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
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- 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_SECRET }}
- name: Docker meta
id: meta_fern_reporter
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
anoop2811/fern-reporter
# generate Docker tags based on the following events/attributes
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:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_fern_reporter.outputs.tags }}
labels: ${{ steps.meta_fern_reporter.outputs.labels }}