Skip to content

fix: set git safe.directory to allow BitBucket builds to mount volumes #2

fix: set git safe.directory to allow BitBucket builds to mount volumes

fix: set git safe.directory to allow BitBucket builds to mount volumes #2

Workflow file for this run

name: Docker
on:
push:
branches:
- main
env:
REGISTRY_IMAGE: devopsconsultants/conventional-changelog-release
QUAY_IMAGE: quay.io/devops_consultants/conventional-changelog-release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
version-file: version.json
preset: conventionalcommits
github-token: ${{ github.token }}
release-count: "0"
- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
outputs:
relVer: ${{ steps.changelog.outputs.tag }}
docker:
runs-on: ubuntu-latest
needs: [release]
steps:
- name: Get Tags for Image
id: meta-new
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY_IMAGE }}
${{ env.QUAY_IMAGE}}
tags: |
type=semver,pattern={{raw}},value=${{ needs.release.outputs.relVer }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# - 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:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_ID }}
password: ${{ secrets.QUAY_PW }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
# platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-new.outputs.tags }}
labels: ${{ steps.meta-new.outputs.labels }}