Skip to content

fix(actions): Try to use a simpler approach for changelogs #12

fix(actions): Try to use a simpler approach for changelogs

fix(actions): Try to use a simpler approach for changelogs #12

Workflow file for this run

name: Release new version
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GIT_AUTHOR_EMAIL: ${{vars.AUTHOR_EMAIL}}
GIT_AUTHOR_NAME: $${{vars.AUTHOR_NAME}}
GIT_COMMITTER_EMAIL: ${{vars.AUTHOR_EMAIL}}
GIT_COMMITTER_NAME: $${{vars.AUTHOR_NAME}}
jobs:
version:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.action.outputs.tag }}
version: ${{ steps.action.outputs.version }}
commit_start: ${{ steps.action.outputs.commit_start}}
commit_end: ${{ steps.action.outputs.commit_end}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate new version
id: action
uses: pier-oliviert/actions@82e3125b67a5ef82458b6687ff71f7ccd0678736
with:
args: /actions/index.ts create version
repo: ${{ github.repository}}
changelog:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
needs: ["version"]
outputs:
changelog: ${{steps.action.outputs.changelog}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Changelog
uses: pier-oliviert/actions@82e3125b67a5ef82458b6687ff71f7ccd0678736
id: action
env:
GIT_CLIFF__CHANGELOG__HEADER: ""
GIT_CLIFF__CHANGELOG__FOOTER: ""
with:
args: /actions/index.ts create changelogs
version: ${{needs.version.outputs.version}}
commit_start: ${{needs.version.outputs.commit_start}}
commit_end: ${{needs.version.outputs.commit_end}}
release:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
needs: ["version", "changelog"]
outputs:
upload_url: ${{steps.action.outputs.upload_url}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy Helm package
id: action
uses: pier-oliviert/actions@82e3125b67a5ef82458b6687ff71f7ccd0678736
with:
args: /actions/index.ts create release
auth_token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.repository}}
version: ${{ needs.version.outputs.version }}
tag: ${{ needs.version.outputs.tag }}
changelog: ${{ needs.changelog.outputs.changelog }}
helm:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
needs: ["version", "release"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Deploy Helm package
uses: pier-oliviert/actions@82e3125b67a5ef82458b6687ff71f7ccd0678736
with:
args: /actions/index.ts create helm
auth_token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.repository }}
upload_url: ${{ needs.release.outputs.upload_url }}
version: ${{ needs.version.outputs.version }}
build-and-push-image:
runs-on: ubuntu-latest
needs: ["version"]
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Controller
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.controller
context: .
target: controller
push: true
build-args: |
PROVIDER_VERSION=${{needs.version.outputs.version}}
tags: |
${{ env.REGISTRY }}/${{github.repository}}:latest
${{ env.REGISTRY }}/${{github.repository}}:${{needs.version.outputs.tag}}
- name: "Providers: AWS"
id: aws
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: aws
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-aws:latest
${{ env.REGISTRY }}/pier-oliviert/providers-aws:${{needs.version.outputs.tag}}
- name: "Providers: Azure"
id: azure
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: azure
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-azure:latest
${{ env.REGISTRY }}/pier-oliviert/providers-azure:${{needs.version.outputs.tag}}
- name: "Providers: Cloudflare"
id: cloudflare
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: cloudflare
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-cloudflare:latest
${{ env.REGISTRY }}/pier-oliviert/providers-cloudflare:${{needs.version.outputs.tag}}
- name: "Providers: deSEC"
id: desec
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: desec
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-desec:latest
${{ env.REGISTRY }}/pier-oliviert/providers-desec:${{needs.version.outputs.tag}}
- name: "Providers: Gcore"
id: gcore
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: gcore
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-gcore:latest
${{ env.REGISTRY }}/pier-oliviert/providers-gcore:${{needs.version.outputs.tag}}