Skip to content

Commit

Permalink
fix tag action
Browse files Browse the repository at this point in the history
  • Loading branch information
karambarakat committed Jan 26, 2023
1 parent 51b50e5 commit 0e2353e
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/strapi-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: Strapi Docker Image

on:
workflow_dispatch:
inputs:
version:
description: version to be added to the image tag
required: ture
type: string
image:
description: the name of the image
default: portfolio-strapi-tunnel
required: true
push:
tags:
- v\d+

#
env:
image: portfolio-strapi-tunnel

jobs:
build:
Expand All @@ -25,10 +19,13 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: set release version
id: version
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./strapi
push: true
tags: ${{ inputs.image }}:${{ inputs.version }}
tags: ${{ env.image }}:${{ steps.version.outputs.tag }}

0 comments on commit 0e2353e

Please sign in to comment.