Merge pull request #399 from hhyasdf/release/v0.8.6 #53
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 | |
on: | |
push: | |
tags: | |
- 'v*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }} | |
cancel-in-progress: true | |
jobs: | |
docker-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Docker amd64 meta | |
id: amd64-meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: hybridnetdev/hybridnet | |
tags: | | |
type=ref,event=tag | |
- name: Docker arm64 meta | |
id: arm64-meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: hybridnetdev/hybridnet-arm64 | |
tags: | | |
type=ref,event=tag | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
if: ${{ github.event_name != 'pull_request' && github.event.action != 'unassigned' }} | |
- name: Build and push amd64 | |
uses: docker/build-push-action@v2.5.0 | |
with: | |
context: . | |
file: ./Dockerfile.amd64 | |
platforms: linux/amd64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.amd64-meta.outputs.tags }} | |
labels: ${{ steps.amd64-meta.outputs.labels }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
- name: Build and push arm64 | |
uses: docker/build-push-action@v2.5.0 | |
with: | |
context: . | |
file: ./Dockerfile.arm64 | |
platforms: linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.arm64-meta.outputs.tags }} | |
labels: ${{ steps.arm64-meta.outputs.labels }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache |