Skip to content

Merge pull request #121 from depot/feat/ceph-only-mode #439

Merge pull request #121 from depot/feat/ceph-only-mode

Merge pull request #121 from depot/feat/ceph-only-mode #439

Workflow file for this run

name: CI
on: push
permissions:
contents: read
id-token: write
packages: write
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm type-check
- run: pnpm build
package:
name: Package
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: depot/setup-action@v1
- name: Compute version
id: version
run: |
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF}" >> $GITHUB_OUTPUT
fi
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/depot/cloud-agent
github-token: ${{ secrets.GITHUB_TOKEN }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: depot/build-push-action@v1
with:
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: CLOUD_AGENT_VERSION=${{ steps.version.outputs.version }}