build(deps): bump org.apache.maven.plugins:maven-project-info-reports… #79
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 Container Image | |
concurrency: | |
group: ci-${{ github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- v[0-9]+ | |
- v[0-9]+.[0-9]+ | |
- cryostat-v[0-9]+.[0-9]+ | |
env: | |
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/Release.key" | |
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04" | |
CI_USER: cryostat+bot | |
CI_REGISTRY: quay.io/cryostat | |
CI_IMG: quay.io/cryostat/cryostat-agent-init | |
jobs: | |
build-container: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository_owner == 'cryostatio' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Install qemu | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qemu-user-static | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} | |
- run: mvn -B -U clean install | |
- id: get-agent-version | |
run: | | |
echo "agent-version=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)" >> $GITHUB_OUTPUT | |
- name: Get date tag | |
run: echo "DATE_TAG=$(date -uI)" >> "$GITHUB_ENV" | |
- name: Build container images and manifest | |
id: buildah-build | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ${{ env.CI_IMG }} | |
archs: amd64, arm64 | |
tags: ${{ steps.get-agent-version.outputs.agent-version }} ${{env.DATE_TAG}} latest | |
containerfiles: | | |
src/main/container/Dockerfile | |
- name: Push to quay.io | |
id: push-to-quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: cryostat-agent-init | |
tags: ${{ steps.buildah-build.outputs.tags }} | |
registry: ${{ env.CI_REGISTRY }} | |
username: ${{ env.CI_USER }} | |
password: ${{ secrets.REPOSITORY_TOKEN }} | |
- name: Print image URL | |
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" |