Skip to content

Merge pull request #4 from soerenschneider/release-please--branches--… #33

Merge pull request #4 from soerenschneider/release-please--branches--…

Merge pull request #4 from soerenschneider/release-please--branches--… #33

---
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
name: release
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/[email protected]
name: release
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
package-name: ${{ github.repository }}
- name: Checkout
uses: actions/[email protected]
if: ${{ steps.release.outputs.release_created }}
- name: Log in to the container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
- name: Extract metadata for container
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=v${{steps.release.outputs.major }}.${{steps.release.outputs.minor }}.${{steps.release.outputs.patch }}
if: ${{ steps.release.outputs.release_created }}
- name: Build and push container image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
if: ${{ steps.release.outputs.release_created }}