Skip to content

ci: use ref_type instead of event_name #8

ci: use ref_type instead of event_name

ci: use ref_type instead of event_name #8

Workflow file for this run

name: Build or Release Image
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+**'
branches:
- 'mayastor'
jobs:
plugin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
id: go
- name: Set Image Tag
run: |
if [[ "${{ github.ref_type }}" = "tag" ]]; then
TAG="${{ github.ref_name }}"
else
TAG="develop"
fi
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "IMAGE_TAG=${TAG}" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Push Image
run: make all