Skip to content

ci: install chisel

ci: install chisel #28

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Get Changelog
id: changelog
run: |
wget https://github.com/git-chglog/git-chglog/releases/download/v0.14.2/git-chglog_0.14.2_linux_amd64.tar.gz
tar xf git-chglog_0.14.2_linux_amd64.tar.gz
REPORT=$(./git-chglog ${{ steps.get_version.outputs.VERSION }})
REPORT="${REPORT//'%'/'%25'}"
REPORT="${REPORT//$'\n'/'%0A'}"
REPORT="${REPORT//$'\r'/'%0D'}"
echo "::set-output name=CHANGELOG::$REPORT"
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Download box
run: wget https://github.com/humbug/box/releases/download/4.6.1/box.phar
- name: Remove dev deps
run: composer install --no-dev
- name: Set version string
run: sed -i -e "s/__VERSION__/${{ steps.get_version.outputs.VERSION }}/g" src/Application.php
- name: Build phar
run: php box.phar compile
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: danger.phar
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: ${{ steps.get_version.outputs.VERSION }}
body: "${{ steps.changelog.outputs.CHANGELOG }}"
draft: false
prerelease: false
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Install Chisel
uses: shyim/chisel-installer@main
- name: Build Docker image arm64
run: ./build.sh ${{ steps.get_version.outputs.VERSION }} arm64 --push
- name: Build Docker image amd64
run: ./build.sh ${{ steps.get_version.outputs.VERSION }} amd64 --push
- run: docker manifest create ghcr.io/shyim/danger-php:${{ steps.get_version.outputs.VERSION }} --amend ghcr.io/shyim/danger-php:${{ steps.get_version.outputs.VERSION }}-amd64 --amend ghcr.io/shyim/danger-php:${{ steps.get_version.outputs.VERSION }}-arm64
- run: docker manifest create ghcr.io/shyim/danger-php:latest --amend ghcr.io/shyim/danger-php:${{ steps.get_version.outputs.VERSION }}-amd64 --amend ghcr.io/shyim/danger-php:${{ steps.get_version.outputs.VERSION }}-arm64
- run: docker manifest push ghcr.io/shyim/danger-php:latest
- run: docker manifest push ghcr.io/shyim/danger-php:${{ steps.get_version.outputs.VERSION }}