Remove mutability from the language #552
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: docker-build-and-push | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- 'master' | |
release: | |
types: | |
- published | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.4 | |
- name: Get the tag version | |
id: tag | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/} | |
# we need qemu and buildx so we can build multiple platforms later | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1.2.0 | |
# BuildKit (used with `docker buildx`) is the best way to build images | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
# This makes image builds fast! | |
- name: Cache Docker layers | |
uses: actions/cache@v2.1.6 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build and push specific release | |
if: github.event_name == 'release' | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: jinko/jinko:${{steps.tag.outputs.tag}} | |
- name: Build and push latest release | |
if: github.event_name == 'release' | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: jinko/jinko:latest | |
- name: Build and push bleeding edge release | |
if: github.event_name == 'push' | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: jinko/jinko:bleeding |