[maven-release-plugin] prepare release release-8-7-3 #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create duck image | |
on: | |
push: | |
tags: ['*'] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Sanitize Version | |
run: | | |
export VERSION=${GITHUB_REF#refs/tags/release-} | |
export VERSION=${VERSION//-/.} | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=semver,pattern={{major}}.{{minor}}.{{patch}},value=${{env.VERSION}} | |
type=semver,pattern={{major}}.{{minor}},value=${{env.VERSION}} | |
type=semver,pattern={{major}},value=${{env.VERSION}} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: | | |
export COUNT=$(git rev-list --count $GITHUB_SHA) | |
mvn -B verify --projects cli/linux --also-make -DskipTests | |
dpkg-deb -R cli/linux/target/release/duck_${{env.VERSION}}.$COUNT-1_amd64.deb . | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
env: | |
DOCKER_BUILDKIT: 1 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |