Skip to content

Fix CI/CD

Fix CI/CD #3

Workflow file for this run

name: elasticobjects-operator ship action
on:
push:
tags:
- 'operator/v*'
concurrency:
group: ci-ship-${{ inputs.git_repo }}-${{ github.ref }}-1
cancel-in-progress: true
jobs:
ship:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- uses: olegtarasov/get-tag@v2.1.2
id: tagName
with:
tagRegex: 'operator/(.*)'
tagRegexGroup: 1
- name: Create valid tag(s)
id: tags
run: |
name="90poe/elasticsearch-objects-operator"
output="$name:${{ steps.tagName.outputs.tag }},$name:latest"
echo "::set-output name=all_tags::${output}"
- name: Install latest major GO version
uses: actions/setup-go@v4
with:
go-version: '1.21' # The Go version to download
- name: Make build for ${{ steps.tags.outputs.all_tags }}
run:
echo ${{ steps.tagName.outputs.tag }} > version.txt;
make build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASS }}
- name: Dockerise
uses: docker/build-push-action@v5
with:
context: ./
builder: ${{ steps.buildx.outputs.name }}
platforms: "linux/amd64,linux/arm64"
tags: ${{ steps.tags.outputs.all_tags }}
file: Dockerfile
push: true