Skip to content

Prepare v0.2.6

Prepare v0.2.6 #40

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- "v*.*.*"
env:
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
DEPLOY_NAME: demo
jobs:
buildImage:
runs-on: ubuntu-20.04
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Retrieve DOJO_VERSION
run: |
echo DOJO_VERSION=$(cat DOJO_VERSION) >> "$GITHUB_ENV"
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
- uses: depot/build-push-action@v1
with:
context: .
build-args: DOJO_VERSION=${{ env.DOJO_VERSION }}
push: true
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Create GitHub Release
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
TAG=${{ github.ref }}
VERSION=${TAG#refs/tags/}
gh release create $VERSION -t $VERSION -n "Release notes for $VERSION"