Skip to content

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.2 to 3.5.6 #163

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.2 to 3.5.6

Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.2 to 3.5.6 #163

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches:
- "**"
tags:
- "v*"
permissions:
contents: read
jobs:
build:
name: Maven build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: temurin
cache: maven
- name: Check formatting
run: mvn -B fmt:check --file pom.xml
- name: Build
run: mvn -B package --file pom.xml
- name: Update dependency graph
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: advanced-security/maven-dependency-submission-action@v4.1.1
build_image:
name: Build container image
runs-on: ubuntu-latest
needs: build
if: |
github.event_name == 'pull_request'
||
(
github.event_name == 'push'
&&
github.ref != 'refs/heads/master'
&&
!startsWith(github.ref, 'refs/tags/')
)
env:
BUILDX_PLATFORMS: linux/amd64,linux/arm64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Build image
run: |
docker buildx build \
--progress plain \
--platform "$BUILDX_PLATFORMS" \
.
publish_image:
name: Publish container image
runs-on: ubuntu-latest
needs: build
if: |
github.repository_owner == 'prometheus'
&&
github.event_name == 'push'
&&
(
github.ref == 'refs/heads/master'
||
startsWith(github.ref, 'refs/tags/v')
)
env:
BUILDX_PLATFORMS: linux/amd64,linux/arm64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to quay.io
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_LOGIN }}
password: ${{ secrets.QUAY_IO_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: ${{ secrets.DOCKER_HUB_LOGIN }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push image
run: |
tags=(master)
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
tags+=(latest)
fi
docker buildx build \
--progress plain \
--platform "$BUILDX_PLATFORMS" \
"${tags[@]/#/--tag=quay.io/prometheus/cloudwatch-exporter:}" \
"${tags[@]/#/--tag=prom/cloudwatch-exporter:}" \
--push .
- name: List images
run: docker images