|
|
|
|
@ -51,7 +51,7 @@ jobs:
|
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Extract metadata for Docker (tag)
|
|
|
|
|
- name: Extract metadata for Docker for tag
|
|
|
|
|
id: meta_tag
|
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
|
@ -60,21 +60,21 @@ jobs:
|
|
|
|
|
tags: |
|
|
|
|
|
type=ref,event=tag
|
|
|
|
|
|
|
|
|
|
- name: Extract metadata for Docker (bleeding)
|
|
|
|
|
id: meta_bleeding
|
|
|
|
|
- name: Extract metadata for Docker on branch
|
|
|
|
|
id: meta_edge
|
|
|
|
|
if: false == startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
|
with:
|
|
|
|
|
images: ${{ env.REGISTRY }}/${{ github.repository }}
|
|
|
|
|
tags: |
|
|
|
|
|
type=sha,prefix=,priority=200
|
|
|
|
|
type=raw,value=bleeding,priority=100
|
|
|
|
|
type=edge,priority=100
|
|
|
|
|
|
|
|
|
|
- name: Get build time
|
|
|
|
|
uses: gerred/actions/current-time@master
|
|
|
|
|
id: build_time
|
|
|
|
|
|
|
|
|
|
- name: Rewrite entries in package.json to repository
|
|
|
|
|
- name: Rewrite entries in package.json to match repository
|
|
|
|
|
uses: microsoft/variable-substitution@v1
|
|
|
|
|
with:
|
|
|
|
|
files: "package.json"
|
|
|
|
|
@ -84,7 +84,7 @@ jobs:
|
|
|
|
|
bugs.url: "${{ github.server_url }}/${{ github.repository }}/issues"
|
|
|
|
|
homepage: "${{ github.server_url }}/${{ github.repository }}#readme"
|
|
|
|
|
|
|
|
|
|
- name: Disable dev flag and set package version (tag)
|
|
|
|
|
- name: Disable dev flag and set package version for tag
|
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
uses: microsoft/variable-substitution@v1
|
|
|
|
|
with:
|
|
|
|
|
@ -93,15 +93,15 @@ jobs:
|
|
|
|
|
dev: "false"
|
|
|
|
|
version: ${{ steps.meta_tag.outputs.version }}
|
|
|
|
|
|
|
|
|
|
- name: Set package version (bleeding)
|
|
|
|
|
- name: Set package version for branch
|
|
|
|
|
if: false == startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
uses: microsoft/variable-substitution@v1
|
|
|
|
|
with:
|
|
|
|
|
files: "package.json"
|
|
|
|
|
env:
|
|
|
|
|
version: ${{ steps.meta_bleeding.outputs.version }}
|
|
|
|
|
version: ${{ steps.meta_edge.outputs.version }}
|
|
|
|
|
|
|
|
|
|
- name: Build and push Docker image (tag)
|
|
|
|
|
- name: Build and push Docker image for tag
|
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
|
with:
|
|
|
|
|
@ -112,12 +112,12 @@ jobs:
|
|
|
|
|
labels: ${{ steps.meta_tag.outputs.labels }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build and push Docker image (bleeding)
|
|
|
|
|
- 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_bleeding.outputs.tags }}
|
|
|
|
|
labels: ${{ steps.meta_bleeding.outputs.labels }}
|
|
|
|
|
tags: ${{ steps.meta_edge.outputs.tags }}
|
|
|
|
|
labels: ${{ steps.meta_edge.outputs.labels }}
|
|
|
|
|
|