Upgrade wrapica and icav2 cli plugins #82
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: Create and Upload Release And Docker Container(s) | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e v1.0, v20.15.10 etc | |
- 'pre-v*' # Push events to matching pre-v, i.ve pre-v1.0, pre-v20.15.10 | |
- 'latest' | |
jobs: | |
# First job | |
build_release: | |
name: Build Release Bundle | |
runs-on: ubuntu-latest | |
steps: | |
# Standard checkout step | |
- name: Checkout code | |
id: git_checkout | |
uses: actions/checkout@v4 | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
# Get tag name, from /ref/heads/<tag> to <tag> | |
- name: Get Tag Name | |
id: get_tag_name | |
run: echo "tag_name=$(basename ${{ github.ref }})" >> "${GITHUB_OUTPUT}" | |
# Is pre-release? | |
- name: Determine if this is a pre-release or not | |
id: is_prerelease | |
run: echo "prerelease=$(if [[ "${{ steps.get_tag_name.outputs.tag_name }}" == "pre"* || "${{ steps.get_tag_name.outputs.tag_name }}" == "dev" ]]; then echo true; else echo false; fi)" >> "${GITHUB_OUTPUT}" | |
# Build project | |
- name: Build project # This would actually build your project, using zip for an example artifact | |
uses: ./.github/actions/build-release | |
with: | |
git_tag: ${{ steps.get_tag_name.outputs.tag_name }} | |
# Create release zip file | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_tag_name.outputs.tag_name }} | |
name: release-${{ steps.get_tag_name.outputs.tag_name }} | |
draft: false | |
body: ${{ github.event.head_commit.message }} | |
prerelease: ${{ steps.is_prerelease.outputs.prerelease == 'true' }} | |
files: | | |
release-${{ steps.get_tag_name.outputs.tag_name }}.zip | |
# Second job - can be run in parallel to building release | |
build_container: | |
name: Build Container | |
runs-on: ubuntu-latest | |
steps: | |
# Standard checkout step | |
- name: Checkout code | |
id: git_checkout | |
uses: actions/checkout@v4 | |
# Use qemu to perform multiplatform builds | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# Use docker buildx to build multi-platform containers | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
use: true | |
install: true | |
buildkitd-config-inline: | | |
[worker.oci] | |
max-parallelism = 2 | |
# Log in to GitHub Container registry | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Build and push docker images | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./ | |
platforms: linux/amd64 | |
push: true | |
tags: ghcr.io/${{ github.repository }}:latest |