Skip to content

only start free trial if no license already #42

only start free trial if no license already

only start free trial if no license already #42

Workflow file for this run

name: Docker Image CI/CD
on:
push:
branches: ["main", "deploy"]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get version
id: get_version
run: echo "VERSION=$(date +'%Y.%m.%d')-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false
- name: Prepare Docker tags
id: prep
run: |
DOCKER_IMAGE=ghcr.io/${GITHUB_REPOSITORY,,}
VERSION=${{ steps.get_version.outputs.VERSION }}
TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${VERSION}"
echo "TAGS=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.prep.outputs.TAGS }}