Skip to content

fix build

fix build #462

name: Release to staging
on:
push:
branches: [main, staging_tests]
jobs:
release-docker:
runs-on: ubuntu-latest
env:
DOCKERHUB_ORGANIZATION: datree
DOCKERHUB_REPO: webhook-staging
name: Release container image to public registries
steps:
- uses: actions/checkout@v3
- name: Define release version
id: define_version
run: |-
OUTPUT_VERSION=$(bash scripts/get_last_short_commit_hash.sh)
echo "detected version = $OUTPUT_VERSION"
echo "version=$OUTPUT_VERSION" >> $GITHUB_OUTPUT
- uses: docker/setup-buildx-action@v2
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push datree image to registries
uses: docker/build-push-action@v3
with:
build-args: |-
"BUILD_ENVIRONMENT=staging"
"WEBHOOK_VERSION=${{ steps.define_version.outputs.version }}"
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.DOCKERHUB_ORGANIZATION }}/${{ env.DOCKERHUB_REPO }}:${{ steps.define_version.outputs.version }}
${{ env.DOCKERHUB_ORGANIZATION }}/${{ env.DOCKERHUB_REPO }}:latest