Skip to content

chore(deps): update rabbitmq docker tag to v4 #390

chore(deps): update rabbitmq docker tag to v4

chore(deps): update rabbitmq docker tag to v4 #390

Workflow file for this run

---
on: # yamllint disable-line rule:truthy
push:
branches:
- 'master'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'master'
release:
types:
- 'created'
schedule:
# Every Tuesday at 03:10
- cron: '10 3 * * 2'
name: πŸ” Continuous integration
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rabbitmq_version: ['alpine', 'management-alpine']
steps:
- name: πŸ“¦ Install goss
uses: e1himself/[email protected]
- name: πŸ“¦ Check out the codebase
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: πŸ€– Generate dist files
run: make generate
- name: 🌎 Set environment variables
env:
IMAGE_NAMESPACE: wayofdev/rabbitmq
TEMPLATE: ${{ matrix.rabbitmq_version }}
run: |
export RELEASE_VERSION="${GITHUB_REF#refs/*/}" \
&& { \
echo "IMAGE_NAMESPACE=${IMAGE_NAMESPACE}"; \
echo "TEMPLATE=${TEMPLATE}"; \
echo "VERSION=${RELEASE_VERSION:1}"; \
} >> "$GITHUB_ENV"
- name: 🐳 Define docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAMESPACE }}
tags: |
type=raw,event=branch,value=latest
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
flavor: |
latest=false
prefix=${{ matrix.rabbitmq_version }}-
- name: πŸ”‘ Login to docker-hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
### For Cross Platform OSX builds uncomment these lines
- name: πŸ–₯️ Set up QEMU
uses: docker/[email protected]
with:
platforms: arm64
- name: πŸš€ Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
install: true
- name: 🏷️ Set tag for docker release image
if: success() && startsWith(github.ref, 'refs/tags/')
run: |
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-${{ env.VERSION }}" >> "$GITHUB_ENV"
- name: 🏷️ Set tag for docker master image
if: success() && ! startsWith(github.ref, 'refs/tags/')
run: |
echo "IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-latest" >> "$GITHUB_ENV"
- name: πŸ› οΈ Build and export to docker
uses: docker/build-push-action@v5
with:
context: ./dist/${{ env.TEMPLATE }}
load: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-latest
cache-to: type=inline
labels: ${{ steps.meta.outputs.labels }}
- name: πŸ§ͺ Test docker image
run: |
export IMAGE_TAG=${{ env.IMAGE_TAG }}; make test
- name: πŸ“€ Push docker image
uses: docker/build-push-action@v5
with:
context: ./dist/${{ env.TEMPLATE }}
### For Cross Platform OSX builds uncomment these lines
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.IMAGE_TAG }}
cache-to: type=inline
...