Skip to content

v0.0.42

v0.0.42 #2

name: Build and push image
on:
release:
types: [published]
env:
REGISTRY: "ghcr.io"
IMAGE: "nccloud/tabby-operator"
TAG: ${{ github.event.release.tag_name }}
jobs:
release:
name: Release Image
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Image Tag
id: set_image_tag
run: echo "::set-output name=IMAGE_TAG::${TAG//v/}"
- name: Login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.set_image_tag.outputs.IMAGE_TAG }}
${{ env.REGISTRY }}/${{ env.IMAGE }}:latest