mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:30:25 +00:00
4bd1694cd5
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
# Copyright (c) Abstract Machines
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: Continuous Delivery
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'docs/**'
|
|
- '.github/workflows/**'
|
|
- 'LICENSE'
|
|
- 'MAINTAINERS'
|
|
- 'CODEOWNERS'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
lint-and-build:
|
|
uses: ./.github/workflows/lint-and-build.yaml
|
|
|
|
build-and-push:
|
|
name: Build and Push Docker Images
|
|
runs-on: ubuntu-latest
|
|
needs: [lint-and-build]
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
fetch-tags: true
|
|
|
|
- name: Get Go version from go.mod
|
|
id: go-version
|
|
run: echo "version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ${{ steps.go-version.outputs.version }}
|
|
cache-dependency-path: "go.sum"
|
|
|
|
- name: Set up Docker Build
|
|
uses: docker/setup-buildx-action@v4
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v4
|
|
with:
|
|
registry: docker.io
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
- name: Build and push Docker images
|
|
run: |
|
|
make latest -j $(nproc)
|
|
|