Skip to content

Commit

Permalink
app version
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Apr 6, 2023
1 parent e2b4977 commit f6feaae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"

- name: "set app version to env"
env:
NEXT_PUBLIC_APP_VERSION: ${{ steps.previoustag.outputs.tag }}"

- name: Extract version number
id: extract_version
run: |
Expand All @@ -62,6 +58,8 @@ jobs:
context: .
file: ./Dockerfile
push: true
build-args: |
"NEXT_PUBLIC_APP_VERSION=${{ steps.previoustag.outputs.tag }}"
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest
${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:${{ steps.extract_version.outputs.version_number }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,14 @@ jobs:
- name: Create short sha
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV

- name: "set app version to env"
env:
NEXT_PUBLIC_APP_VERSION: v${{ github.ref_name }}-${{ env.SHORT_SHA }}"

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
build-args: |
"NEXT_PUBLIC_APP_VERSION=${{ steps.previoustag.outputs.tag }}"
# platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
Expand Down

0 comments on commit f6feaae

Please sign in to comment.