Skip to content

Add a github-actions-based CI #1

Add a github-actions-based CI

Add a github-actions-based CI #1

Workflow file for this run

name: CI
on:
push:
branches:
- main
- r[1-9]
pull_request:
branches:
- main
- r[1-9]
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Log into quay.io
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Set timestamp
id: timestamp
run: echo "timestamp=$(date +%Y%m%d%H%M%S)" >> "$GITHUB_OUTPUT"
- name: Build and push the container image
id: build-and-push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: docker
push: ${{ github.event_name != 'pull_request' }}
tags: |
latest
${{ github.ref_name }}
${{ github.sha }}
${{ github.ref_name }}-${{ github.sha }}
${{ github.ref_name }}-${{ github.sha }}-${{ steps.timestamp.outputs.timestamp }}
labels: |
quay.io/nebulous/activemq-broker
cache-from: type=gha
cache-to: type=gha,mode=max