Skip to content

Workflow file for this run

name: Build, Run and Test Docker Image
on: [push]
jobs:
build-run-test:
runs-on: ubuntu-latest
strategy:
matrix:
images:
- artifact: alfresco-elasticsearch-live-indexing-metadata
version: 4.0.1
name: alfresco-enterprise-search-metadata
path: search/enterprise/metadata
extension: -app.jar
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Setup .netrc
run: |
echo "machine nexus.alfresco.com" >> ~/.netrc
echo "login ${{ secrets.NEXUS_USERNAME }}" >> ~/.netrc
echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc
- name: Fetch artifacts from nexus
run: bash ./scripts/fetch-artifact.sh ${{ matrix.images.artifact }} ${{ matrix.images.version }} ${{ matrix.images.extension }}
working-directory: ${{ github.workspace }}
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:${{ matrix.images.path }}"
tags: ${{ matrix.images.path }}:test
push: false
- name: Run Docker image
uses: addnab/docker-run-action@v3
with:
image: ${{ matrix.images.path }}:test
- name: Check the status of container
run: docker ps -a