Bump Alfresco/alfresco-build-tools from 3.0.2 to 3.5.0 #344
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: Build | |
on: | |
push: | |
paths-ignore: | |
- README.md | |
jobs: | |
build_rpm: | |
name: Build on ${{ matrix.base_image }} for ${{ matrix.target_arch }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- base_image: rockylinux:9 | |
target_arch: x86_64 | |
nexus_classifier: el9 | |
- base_image: rockylinux:8 | |
target_arch: x86_64 | |
nexus_classifier: el8 | |
- base_image: rockylinux:8 | |
target_arch: aarch64 | |
nexus_classifier: el8-aarch64 | |
- base_image: centos:7 | |
target_arch: x86_64 | |
nexus_classifier: el7 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Prepare image | |
run: docker build . -t buildenv --build-arg BASE_IMAGE=${{ matrix.base_image }} | |
working-directory: rpms | |
- name: Build and Install | |
run: docker run --name build buildenv ${{ steps.variables.outputs.imagemagick_version }} ${{ matrix.target_arch }} | |
- name: Retrieve built packages | |
env: | |
IMAGEMAGICK_VERSION: ${{ steps.variables.outputs.imagemagick_version }} | |
run: | | |
docker cp build:/root/rpmbuild/RPMS/ . | |
ls -l RPMS/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.nexus_classifier }}-rpm | |
path: RPMS/${{ matrix.target_arch }}/*.rpm | |
- name: Deploy to nexus | |
uses: Alfresco/alfresco-build-tools/.github/actions/maven-deploy-file@8093e80685cde1fcd05cccda09016c2616393941 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
group-id: org.imagemagick | |
artifact-id: imagemagick-distribution | |
repository-url: https://nexus.alfresco.com/nexus/content/repositories/thirdparty/ | |
version: ${{ steps.variables.outputs.imagemagick_version }}-ci-${{ steps.variables.outputs.imagemagick_release }} | |
generate-pom: false | |
file: RPMS/${{ matrix.target_arch }}/ImageMagick-${{ steps.variables.outputs.imagemagick_version }}.${{ matrix.target_arch }}.rpm | |
classifier: ${{ matrix.nexus_classifier }} | |
files: RPMS/${{ matrix.target_arch }}/ImageMagick-libs-${{ steps.variables.outputs.imagemagick_version }}.${{ matrix.target_arch }}.rpm | |
classifiers: ${{ matrix.nexus_classifier }}-libs | |
types: rpm | |
maven-username: ${{ secrets.NEXUS_USERNAME }} | |
maven-password: ${{ secrets.NEXUS_PASSWORD }} | |
build_ubuntu: | |
name: Build on ubuntu:${{ matrix.image_tag }} for x86_64 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image_tag: | |
- 22.04 | |
- 20.04 | |
- 18.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Prepare image | |
run: docker build . -t buildenv --build-arg IMAGE_TAG=${{ matrix.image_tag }} | |
working-directory: debs | |
- name: Build and Install | |
run: docker run --name build buildenv ${{ steps.variables.outputs.imagemagick_version }} | |
- name: Retrieve built packages | |
env: | |
IMAGEMAGICK_VERSION: ${{ steps.variables.outputs.imagemagick_version }} | |
run: | | |
docker cp build:/build/imagemagick-alfresco_${IMAGEMAGICK_VERSION}_amd64.deb . | |
docker cp build:/build/imagemagick-alfresco-dev_${IMAGEMAGICK_VERSION}_amd64.deb . | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ubuntu${{ matrix.image_tag }}-deb | |
path: "*.deb" | |
- name: Deploy to nexus | |
uses: Alfresco/alfresco-build-tools/.github/actions/maven-deploy-file@8093e80685cde1fcd05cccda09016c2616393941 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
group-id: org.imagemagick | |
artifact-id: imagemagick-distribution | |
repository-url: https://nexus.alfresco.com/nexus/content/repositories/thirdparty/ | |
version: ${{ steps.variables.outputs.imagemagick_version }}-ci-${{ steps.variables.outputs.imagemagick_release }} | |
generate-pom: false | |
file: ${{ github.workspace }}/imagemagick-alfresco_${{ steps.variables.outputs.imagemagick_version }}_amd64.deb | |
classifier: ubuntu-${{ matrix.image_tag }} | |
files: ${{ github.workspace }}/imagemagick-alfresco-dev_${{ steps.variables.outputs.imagemagick_version }}_amd64.deb | |
classifiers: ubuntu-${{ matrix.image_tag }}-dev | |
types: deb | |
maven-username: ${{ secrets.NEXUS_USERNAME }} | |
maven-password: ${{ secrets.NEXUS_PASSWORD }} |