| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- name: Release Docker Images for RC
- on:
- push:
- branches:
- - rc/**
- jobs:
- build-rc:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup semver
- run: |
- semver=`npm run version --silent`
- echo "::set-output name=SEMVER::$semver"
- - name: Docker meta
- id: meta
- uses: docker/metadata-action@v3
- with:
- images: weseek/growi,ghcr.io/weseek/growi
- tags: |
- type=raw,value=${{ steps.meta.semver.outputs.SEMVER }}
- type=raw,value=${{ steps.meta.semver.outputs.SEMVER }}.{{sha}}
- - name: Login to docker.io registry
- run: |
- echo ${{ secrets. DOCKER_REGISTRY_PASSWORD }} | docker login --username wsmoogle --password-stdin
- - name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: wsmoogle
- password: ${{ secrets.DOCKER_REGISTRY_ON_GITHUB_PASSWORD }}
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- - name: Build and push
- uses: docker/build-push-action@v2
- with:
- context: .
- file: ./docker/Dockerfile
- platforms: linux/amd64
- push: true
- tags: ${{ steps.meta.outputs.tags }}
- - name: Check whether workspace is clean
- run: |
- STATUS=`git status --porcelain`
- if [ -z "$STATUS" ]; then exit 0; else exit 1; fi
|