Docker - publish experimental image #106
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: Docker - publish experimental image | |
on: | |
workflow_dispatch: | |
inputs: | |
name: | |
required: true | |
description: The suffix of the published docker image. | |
target: | |
default: 'lakefs' | |
type: choice | |
options: | |
- lakefs | |
- lakectl | |
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy: | |
name: Build and push Docker image | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# This is used to fetch all the history in order to get the latest tag (for step "Extract Version") | |
fetch-depth: 0 | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18.17.0" | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22.6" | |
id: go | |
- uses: bufbuild/[email protected] | |
with: | |
github_token: ${{ github.token }} | |
- name: Extract version | |
shell: bash | |
run: echo "tag=$(echo $(git describe --abbrev=1 --tags)-$(echo ${{ inputs.name }}))" >> $GITHUB_OUTPUT | |
id: version | |
- name: Generate code | |
run: make gen VERSION=${{ steps.version.outputs.tag }} | |
- name: Checks validator | |
run: make checks-validator | |
env: | |
GOLANGCI_LINT_FLAGS: --out-format github-actions | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push lakefs | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
target: ${{ inputs.target }} | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
build-args: VERSION=${{ steps.version.outputs.tag }} | |
tags: | | |
treeverse/experimental-lakefs:${{ steps.version.outputs.tag }} |