Skip to content

chore(deps): update docker/metadata-action action to v5 #67

chore(deps): update docker/metadata-action action to v5

chore(deps): update docker/metadata-action action to v5 #67

Workflow file for this run

name: Build Docker
env:
ANSIBLE_VERSION: 7.5.0-r0
on:
push:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
name/app
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build & Push docker image
id: build_docker
uses: docker/build-push-action@v4
with:
build-args: |
ANSIBLE_VERSION=${{ env.ANSIBLE_VERSION }}
push: false
- name: Create Release
id: create_release
if: github.ref == 'refs/heads/main'
uses: ncipollo/release-action@v1
with:
tag: 1.0.${{ github.run_number }}-ansible-${{ env.ANSIBLE_VERSION }}
name: Release v1.0.${{ github.run_number }}
body: |
Image v1.0.${{ github.run_number }}
Ansible Version : ${{ env.ANSIBLE_VERSION }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Push docker image release
id: push_docker_release
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v4
with:
build-args: |
ANSIBLE_VERSION=${{ env.ANSIBLE_VERSION }}
push: true
tags: cnieg/ansible:1.0.${{ github.run_number }}-ansible-${{ env.ANSIBLE_VERSION }}
labels: ${{ steps.meta.outputs.labels }}