Skip to content

bump: version 0.1.0 → 0.2.0 #9

bump: version 0.1.0 → 0.2.0

bump: version 0.1.0 → 0.2.0 #9

Workflow file for this run

name: Publish Docker Images
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish:
name: Publish Docker Images
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the GitHub Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata for Docker
id: docker-metadata
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/traceloop/hub # GitHub
traceloop/hub # Docker Hub
tags: |
type=sha
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}
platforms: |
linux/amd64, linux/arm64
deploy:
name: Deploy to Traceloop
runs-on: ubuntu-latest
needs: publish
steps:
- name: Install Octopus CLI
uses: OctopusDeploy/install-octopus-cli-action@v3
with:
version: "*"
- name: Create Octopus Release
env:
OCTOPUS_API_KEY: ${{ secrets.OCTOPUS_API_KEY }}
OCTOPUS_URL: ${{ secrets.OCTOPUS_URL }}
OCTOPUS_SPACE: ${{ secrets.OCTOPUS_SPACE }}
run: octopus release create --project hub --version=sha-${GITHUB_SHA::7} --packageVersion=sha-${GITHUB_SHA::7} --no-prompt
- name: Deploy Octopus release
env:
OCTOPUS_API_KEY: ${{ secrets.OCTOPUS_API_KEY }}
OCTOPUS_URL: ${{ secrets.OCTOPUS_URL }}
OCTOPUS_SPACE: ${{ secrets.OCTOPUS_SPACE }}
run: octopus release deploy --project hub --version=sha-${GITHUB_SHA::7} --environment Staging --no-prompt