mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-22 11:29:06 -05:00
update Dockerfile on release
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
name: Push Docker Image to DockerHub
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'SemVer format release tag, i.e. 0.24.5'
|
||||
required: true
|
||||
repository_dispatch:
|
||||
types: [ push-docker-image ]
|
||||
|
||||
jobs:
|
||||
docker-image-push:
|
||||
name: Push Docker Image
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/dolt:${{ github.event.inputs.version || github.event.client_payload.version }} , ${{ secrets.DOCKER_HUB_USERNAME }}/dolt:latest
|
||||
build-args: |
|
||||
DOLT_VERSION=${{ github.event.inputs.version || github.event.client_payload.version }}
|
||||
@@ -37,10 +37,15 @@ jobs:
|
||||
env:
|
||||
FILE: ${{ format('{0}/go/cmd/dolt/dolt.go', github.workspace) }}
|
||||
NEW_VERSION: ${{ needs.format-version.outputs.version }}
|
||||
- name: Update Dockerfile
|
||||
run: sed -i -e 's/ARG DOLT_VERSION=.*/ARG DOLT_VERSION='"$NEW_VERSION"'/' "$FILE"
|
||||
env:
|
||||
FILE: ${{ format('{0}/docker/Dockerfile', github.workspace) }}
|
||||
NEW_VERSION: ${{ needs.format-version.outputs.version }}
|
||||
- uses: EndBug/add-and-commit@v7
|
||||
with:
|
||||
message: ${{ format('[ga-bump-release] Update Dolt version to {0} and release v{0}', needs.format-version.outputs.version) }}
|
||||
add: ${{ format('{0}/go/cmd/dolt/dolt.go', github.workspace) }}
|
||||
add: ${{ format('[{0}/go/cmd/dolt/dolt.go, {0}/docker/Dockerfile]', github.workspace) }}
|
||||
cwd: "."
|
||||
- name: Build Binaries
|
||||
id: build_binaries
|
||||
@@ -164,14 +169,3 @@ jobs:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
event-type: release-dolt
|
||||
client-payload: '{"version": "${{ needs.format-version.outputs.version }}", "actor": "${{ github.actor }}"}'
|
||||
|
||||
docker-image-push:
|
||||
needs: [ format-version, create-release ]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Trigger Push Docker Image
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
event-type: push-docker-image
|
||||
client-payload: '{"version": "${{ needs.format-version.outputs.version }}"}'
|
||||
|
||||
Reference in New Issue
Block a user