Add missing OS dependencies #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
packages: write | |
env: | |
TARGET_PLATFORMS: linux/amd64,linux/arm64 | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Create release branch and bump version | |
env: | |
REF: ${{ github.ref }} | |
run: | | |
BRANCH=release/${REF:10} | |
git config --local user.email "ci@convoypanel.com" | |
git config --local user.name "Convoy CI" | |
git checkout -b $BRANCH | |
git push -u origin $BRANCH | |
sed -i 's/"version": "0.0.0",/"version": "'"${REF:11}"'",/' package.json | |
sed -i "s/version = \"0.0.0\"/version = \"${REF:11}\"/" src-rust/Cargo.toml | |
git add package.json | |
git add src-rust/Cargo.toml | |
git commit -m "bump version for release" | |
git push -u origin $BRANCH | |
- name: Generate Image Metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Extract Changelog | |
id: extract_changelog | |
env: | |
REF: ${{ github.ref }} | |
run: | | |
sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG | |
echo "version_name=${REF:10}" >> $GITHUB_OUTPUT | |
- name: Set Up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set Up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: ${{ env.TARGET_PLATFORMS }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.ref }} | |
name: ${{ steps.extract_changelog.outputs.version_name }} | |
bodyFile: ./RELEASE_CHANGELOG | |
draft: true | |
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }} |