Skip to content

release: prepare 2.4.4 #7

release: prepare 2.4.4

release: prepare 2.4.4 #7

Workflow file for this run

name: Release
on:
push:
tags:
- '*.*.*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Validate tag and release metadata
run: |
bash ./scripts/validate-release-tag.sh "${GITHUB_REF_NAME}"
- name: Extract changelog
run: |
awk '/^## \['"${GITHUB_REF_NAME}"'\]/{found=1; next} /^## \[/{if(found) exit} found{print}' CHANGELOG.md > release_notes.md
- name: Check Docker Hub credentials
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
test -n "$DOCKERHUB_USERNAME" || {
echo "DOCKERHUB_USERNAME is required to publish the 0state/icey image" >&2
exit 1
}
test -n "$DOCKERHUB_TOKEN" || {
echo "DOCKERHUB_TOKEN is required to publish the 0state/icey image" >&2
exit 1
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract image metadata
id: image_meta
uses: docker/metadata-action@v5
with:
images: 0state/icey
tags: |
type=raw,value=${{ github.ref_name }}
type=raw,value=latest
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.image_meta.outputs.tags }}
labels: ${{ steps.image_meta.outputs.labels }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: icey ${{ github.ref_name }}
body_path: release_notes.md
draft: false
prerelease: false
generate_release_notes: false