Skip to content

Brew formula update for cloud2code version v0.2.13 #25

Brew formula update for cloud2code version v0.2.13

Brew formula update for cloud2code version v0.2.13 #25

Workflow file for this run

# a pipeline to create container image on changes to cloud2code.rb file
name: cloud2code
on:
push:
branches:
- main
paths:
- 'cloud2code.rb'
- cloud2code/Dockerfile
- .github/workflows/cloud2code.yaml
env:
REGISTRY: ghcr.io
IMAGE_NAME: stackgenhq/cloud2code
jobs:
build:
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
- platform: linux/arm64
runner: ubuntu-22.04-arm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
sparse-checkout: |
cloud2code
cloud2code.rb
- name: Get cloud2code version
id: version
run: |
echo "VERSION=$(grep 'version' cloud2code.rb | awk '{print $NF}' | tr -d '"')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ steps.version.outputs.VERSION }}
type=raw,value=latest
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build and push
uses: docker/build-push-action@v6
with:
context: ./cloud2code
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
push: true
provenance: false
labels: ${{ steps.meta.outputs.labels }}
build-args: |-
CLOUD2CODE_VERSION=${{ steps.version.outputs.VERSION }}