Skip to content

1.0.1 - Fix mqtt bug release #49

1.0.1 - Fix mqtt bug release

1.0.1 - Fix mqtt bug release #49

name: Docker Image CI
on:
push:
tags:
- v**
pull_request:
branches: [ master ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name == 'push'
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Setup QEMU
uses: docker/[email protected]
- name: Docker Setup Buildx
uses: docker/[email protected]
with:
version: latest
install: true
- name: Docker Metadata action
id: meta
if: github.event_name == 'push'
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=${{ github.event_name == 'push' }}
tags: ${{ github.ref_name }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
context: .
file: Dockerfile
platforms: linux/arm/v7,linux/arm64,linux/amd64
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Create release directory
run: mkdir release
- name: Zip Release
if: github.event_name == 'push'
uses: TheDoctor0/[email protected]
with:
type: 'zip'
filename: release/ankerctl-${{ github.ref_name }}.zip
exclusions: '*.git* /*release/*'
- name: GZip Release
if: github.event_name == 'push'
uses: TheDoctor0/[email protected]
with:
type: 'tar'
filename: release/ankerctl-${{ github.ref_name }}.tar.gz
exclusions: '*.git* release'
- name: Release
if: ${{ github.event_name == 'push' }}
uses: docker://antonyurchenko/git-release:v5.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release/ankerctl*