Bump actions/download-artifact from 3 to 4 #386
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: | |
configure: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix_rpms: ${{ steps.set-matrix.outputs.matrix_rpms }} | |
matrix_test: ${{ steps.set-matrix.outputs.matrix_test }} | |
matrix_debs: ${{ steps.set-matrix.outputs.matrix_debs }} | |
steps: | |
- name: Checkout to repository | |
uses: actions/checkout@v4 | |
- name: Set matrix data | |
id: set-matrix | |
run: | | |
echo "matrix_rpms=$(jq -c . < ./rpms/config.json)" >> $GITHUB_OUTPUT | |
echo "matrix_debs=$(jq -c . < ./debs/config.json)" >> $GITHUB_OUTPUT | |
echo "matrix_test=$(jq -c 'del(.include[] | select(.target_arch == "aarch64"))' < rpms/config.json)" >> $GITHUB_OUTPUT | |
build_rpms: | |
name: Build on ${{ matrix.base_image }} for ${{ matrix.target_arch }} | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_rpms) }} | |
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 | |
test_rpms: | |
name: Test on ${{ matrix.base_image }} for ${{ matrix.target_arch }} | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
- build_rpms | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_test) }} | |
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: Download RPMs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-rpm | |
path: rpms/tests/ | |
- name: List RPMs | |
run: ls -R rpms/tests/*.rpm | |
- name: Prepare image | |
run: docker build . -t testenv --build-arg BASE_IMAGE=${{ matrix.base_image }} | |
working-directory: rpms/tests/ | |
- name: Install & Test Packages | |
run: docker run --name buildtest testenv ${{ steps.variables.outputs.imagemagick_version }} ${{ matrix.target_arch }} | |
deploy_rpms: | |
name: Deploy ${{ matrix.base_image }} for ${{ matrix.target_arch }} | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
- build_rpms | |
- test_rpms | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_test) }} | |
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: Download RPMs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-rpm | |
- name: List RPMs | |
run: ls -R *.rpm | |
- name: Deploy to nexus | |
uses: Alfresco/alfresco-build-tools/.github/actions/maven-deploy-file@9cf7c9d178e9ab74bf533217febe4dafe73247f4 | |
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: ImageMagick-${{ steps.variables.outputs.imagemagick_version }}.${{ matrix.target_arch }}.rpm | |
classifier: ${{ matrix.nexus_classifier }} | |
files: 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 | |
needs: | |
- configure | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_debs) }} | |
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" | |
test_ubuntu: | |
name: Test on ubuntu:${{ matrix.image_tag }} for x86_64 | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
- build_ubuntu | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_debs) }} | |
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: Download DEBs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ubuntu${{ matrix.image_tag }}-deb | |
path: debs/tests/ | |
- name: List Debs | |
run: ls -R debs/tests/*.deb | |
- name: Prepare test image | |
run: docker build . -t testenv --build-arg IMAGE_TAG=${{ matrix.image_tag }} | |
working-directory: debs/tests/ | |
- name: Install & Test Packages | |
run: docker run --name buildtest testenv ${{ steps.variables.outputs.imagemagick_version }} | |
deploy_ubuntu: | |
name: Deploy on ubuntu:${{ matrix.image_tag }} for x86_64 | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
- build_ubuntu | |
- test_ubuntu | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_debs) }} | |
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: Download DEBs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ubuntu${{ matrix.image_tag }}-deb | |
- name: List Debs | |
run: ls -R *.deb | |
- name: Deploy to nexus | |
uses: Alfresco/alfresco-build-tools/.github/actions/maven-deploy-file@9cf7c9d178e9ab74bf533217febe4dafe73247f4 | |
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: imagemagick-alfresco_${{ steps.variables.outputs.imagemagick_version }}_amd64.deb | |
classifier: ubuntu-${{ matrix.image_tag }} | |
files: 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 }} |