feat: add support for Ubuntu24 for mongo 7.0 #282
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 atlas-ansible-utils Docker Image | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v*.*.* | |
pull_request: | |
branches: [ "main" ] | |
env: | |
REGISTRY: docker.io | |
IMAGE_NAME: ednxops/atlas-ansible-utils | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: setup Docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log into registry ${{ env.REGISTRY }} | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=semver,pattern={{version}} | |
type=sha,prefix= | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
id: imgbuild | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' }} | |
load: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Run Docker image to make sure ansible-playbook binary is usable | |
run: docker run --rm ${{ steps.imgbuild.outputs.imageid }} |