test docker workflow #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Docker EE | |
on: | |
workflow_run: | |
workflows: [Disabled-Release NPM] | |
types: | |
- completed | |
push: | |
branches: | |
- 'release/**' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set Current Version | |
run: | | |
CURRENT_VERSION=$(node -p 'require("./lerna.json").version') | |
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV | |
- uses: docker/setup-qemu-action@v1 | |
- uses: docker/setup-buildx-action@v1 | |
with: | |
driver-opts: network=host | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
steedos/steedos-enterprise | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=schedule | |
type=semver,pattern={{version}},value=v${CURRENT_VERSION} | |
type=semver,pattern={{major}}.{{minor}},value=v${CURRENT_VERSION} | |
type=semver,pattern={{major}},value=v${CURRENT_VERSION} | |
- uses: docker/login-action@v1 | |
name: Login Docker Hub | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push docker | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./deploy/enterprise | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |