Skip to content

fix(auth): respond meaningful message on failure #50

fix(auth): respond meaningful message on failure

fix(auth): respond meaningful message on failure #50

Workflow file for this run

name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
packages: write
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release Please
uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
# From:
# https://github.com/googleapis/release-please-action?tab=readme-ov-file#creating-majorminor-tags
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Tag Major and Minor Versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
- name: Setup QEMU
if: ${{ steps.release.outputs.release_created }}
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
if: ${{ steps.release.outputs.release_created }}
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ steps.release.outputs.release_created }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Metadata
if: ${{ steps.release.outputs.release_created }}
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Commit SHA Tag
# The Tag based on the branch (main)
# The "prod" Tag, indicating a production-ready image
# The Major, Major.Minor, and Major.Minor.Patch tags
tags: |
type=sha
type=ref,event=branch
prod
${{ steps.release.outputs.major }}
${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
- name: Build and Push
if: ${{ steps.release.outputs.release_created }}
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}