Skip to content

Merge pull request #20 from pluralsh/docker-registry #14

Merge pull request #20 from pluralsh/docker-registry

Merge pull request #20 from pluralsh/docker-registry #14

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
bump:
runs-on: ubuntu-latest
outputs:
newTag: ${{ steps.version-bump.outputs.newTag }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Bump version
id: version-bump
uses: phips28/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
major-wording: BREAKING CHANGE
minor-wording: feat,minor
patch-wording: fix,chore
publish:
needs: bump
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/pluralsh/plural-renovate
docker.io/pluralsh/plural-renovate
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}},value=${{ needs.bump.outputs.newTag }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker
uses: docker/login-action@v3
with:
username: mjgpluralsh
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: '.'
file: './Dockerfile'
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
release:
needs: bump
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Create GitHub release
uses: softprops/[email protected]
with:
tag_name: ${{ needs.bump.outputs.newTag }}
generate_release_notes: true
- name: Push Chart to GHCR
uses: appany/[email protected]
with:
name: plural-renovate
repository: pluralsh
tag: ${{ needs.bump.outputs.newTag }}-helm
registry: ghcr.io
registry_username: ${{ github.repository_owner }}
registry_password: ${{ secrets.GITHUB_TOKEN }}