Skip to content

Feat[MQB]: Make authentication workflow use plugins #567

Feat[MQB]: Make authentication workflow use plugins

Feat[MQB]: Make authentication workflow use plugins #567

Workflow file for this run

name: Publish release

Check failure on line 1 in .github/workflows/publish.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yaml

Invalid workflow file

(Line: 17, Col: 9): Unexpected symbol: '"rc"'. Located at position 58 within expression: github.event_name == 'push' && contains(github.ref_name, "rc"), (Line: 35, Col: 9): Unexpected symbol: '"rc"'. Located at position 59 within expression: github.event_name == 'push' && !contains(github.ref_name, "rc")
on:
push:
# Publish `v*` tags as releases.
tags:
- v[0-9]+.[0-9]+.[0-9]+ # Releases
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ # Release Candidates
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
create-github-prerelease:
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref_name, "rc")
permissions:
contents: write
steps:
- name: Create release candidate
id: create_release_candidate
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: Release Candidate ${{ github.ref_name }}
draft: true # So we can write release notes
prelease: true
generate_release_notes: true
create-github-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && !contains(github.ref_name, "rc")
permissions:
contents: write
steps:
- name: Create release
id: create_release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
draft: true # So we can write candidate release notes
prelease: false
generate_release_notes: true
build-and-publish-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}