|
|
|
@ -51,22 +51,13 @@ jobs:
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
|
|
- name: Extract metadata for Docker for tag
|
|
|
|
- name: Extract metadata for Docker
|
|
|
|
id: meta_tag
|
|
|
|
id: meta
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
images: ${{ env.REGISTRY }}/${{ github.repository }}
|
|
|
|
|
|
|
|
tags: |
|
|
|
|
|
|
|
|
type=ref,event=tag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Extract metadata for Docker on branch
|
|
|
|
|
|
|
|
id: meta_edge
|
|
|
|
|
|
|
|
if: false == startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
images: ${{ env.REGISTRY }}/${{ github.repository }}
|
|
|
|
images: ${{ env.REGISTRY }}/${{ github.repository }}
|
|
|
|
tags: |
|
|
|
|
tags: |
|
|
|
|
|
|
|
|
type=ref,event=tag,priority=400
|
|
|
|
type=sha,prefix=,priority=200
|
|
|
|
type=sha,prefix=,priority=200
|
|
|
|
type=edge,priority=100
|
|
|
|
type=edge,priority=100
|
|
|
|
|
|
|
|
|
|
|
|
@ -79,27 +70,38 @@ jobs:
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
files: "package.json"
|
|
|
|
files: "package.json"
|
|
|
|
env:
|
|
|
|
env:
|
|
|
|
|
|
|
|
version: ${{ steps.meta.outputs.version }}
|
|
|
|
releaseDate: ${{ steps.build_time.outputs.time }}
|
|
|
|
releaseDate: ${{ steps.build_time.outputs.time }}
|
|
|
|
repository.url: "git+${{ github.server_url }}/${{ github.repository }}.git"
|
|
|
|
repository.url: "git+${{ github.server_url }}/${{ github.repository }}.git"
|
|
|
|
bugs.url: "${{ github.server_url }}/${{ github.repository }}/issues"
|
|
|
|
bugs.url: "${{ github.server_url }}/${{ github.repository }}/issues"
|
|
|
|
homepage: "${{ github.server_url }}/${{ github.repository }}#readme"
|
|
|
|
homepage: "${{ github.server_url }}/${{ github.repository }}#readme"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Disable dev flag and set package version for tag
|
|
|
|
- name: Build and push Docker image on branch
|
|
|
|
|
|
|
|
if: false == startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
push: true
|
|
|
|
|
|
|
|
context: .
|
|
|
|
|
|
|
|
file: dev/build/Dockerfile
|
|
|
|
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Extract metadata for Docker for tag
|
|
|
|
|
|
|
|
id: metatag
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: microsoft/variable-substitution@v1
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
files: "package.json"
|
|
|
|
images: ${{ env.REGISTRY }}/${{ github.repository }}
|
|
|
|
env:
|
|
|
|
tags: |
|
|
|
|
dev: "false"
|
|
|
|
type=ref,event=tag
|
|
|
|
version: ${{ steps.meta_tag.outputs.version }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set package version for branch
|
|
|
|
- name: Set dev flag to false in package.json for tag
|
|
|
|
if: false == startsWith(github.ref, 'refs/tags/v')
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: microsoft/variable-substitution@v1
|
|
|
|
uses: microsoft/variable-substitution@v1
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
files: "package.json"
|
|
|
|
files: "package.json"
|
|
|
|
env:
|
|
|
|
env:
|
|
|
|
version: ${{ steps.meta_edge.outputs.version }}
|
|
|
|
dev: "false"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build and push Docker image for tag
|
|
|
|
- name: Build and push Docker image for tag
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
@ -108,16 +110,5 @@ jobs:
|
|
|
|
push: true
|
|
|
|
push: true
|
|
|
|
context: .
|
|
|
|
context: .
|
|
|
|
file: dev/build/Dockerfile
|
|
|
|
file: dev/build/Dockerfile
|
|
|
|
tags: ${{ steps.meta_tag.outputs.tags }}
|
|
|
|
tags: ${{ steps.metatag.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta_tag.outputs.labels }}
|
|
|
|
labels: ${{ steps.metatag.outputs.labels }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build and push Docker image on branch
|
|
|
|
|
|
|
|
if: false == startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
push: true
|
|
|
|
|
|
|
|
context: .
|
|
|
|
|
|
|
|
file: dev/build/Dockerfile
|
|
|
|
|
|
|
|
tags: ${{ steps.meta_edge.outputs.tags }}
|
|
|
|
|
|
|
|
labels: ${{ steps.meta_edge.outputs.labels }}
|
|
|
|
|
|
|
|
|