Skip to content

Merge pull request #118 from gympass/hotfix/cert-discovery #6

Merge pull request #118 from gympass/hotfix/cert-discovery

Merge pull request #118 from gympass/hotfix/cert-discovery #6

name: Create and publish a release candidate Docker image
on:
push:
branches:
- 'develop'
paths:
- 'internal/**'
- 'controllers/**'
- 'api/**'
- 'main.go'
- 'go.mod'
- 'go.sum'
- 'Dockerfile'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/gympass/cdn-origin-controller
flavor: |
latest=false
tags: |
type=ref,suffix=-rc-{{sha}},event=branch
type=ref,event=pr
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}