Skip to content

chore(deps): update quay.io/michard/nginx_base_image docker tag to v0… #113

chore(deps): update quay.io/michard/nginx_base_image docker tag to v0…

chore(deps): update quay.io/michard/nginx_base_image docker tag to v0… #113

name: on-commit
on:
push:
paths:
- 'Containerfile'
- 'website/**'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
bump_tag:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
# GitHub Action: https://github.com/marketplace/actions/github-tag-bump
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
DEFAULT_BRANCH: main
WITH_V: false
changelog:
needs: bump_tag
runs-on: ubuntu-latest
permissions:
contents: write
name: Generate and Commit Changelog
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Generate Changelog
uses: smichard/conventional_changelog@2.0.8
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fix file permissions
run: |
sudo chown -R $(whoami):$(whoami) .
- name: Set Git User Info
run: |
git config user.name 'GitHub Actions Bot'
git config user.email 'actions@github.com'
- name: Commit Changelog
run: |
git add CHANGELOG.md
git commit -m "docs: :robot: changelog file generated" || echo "No changes to commit"
git push
build_and_push:
needs: changelog
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Log in to target registry
run: |
echo ${{ secrets.TARGET_REGISTRY_PASSWORD }} | docker login quay.io -u ${{ secrets.TARGET_REGISTRY_USERNAME }} --password-stdin
- name: Get tag from bumped version
id: tag
run: |
# Fetch the latest changes
git fetch --tags
TAG=$(git describe --tags --abbrev=0 || echo "latest")
echo "TAG=$TAG" >> $GITHUB_ENV
echo "Current build tag:"
echo $TAG
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build container image and push
uses: docker/build-push-action@v6
with:
context: .
file: Containerfile
platforms: linux/amd64,linux/arm64
push: true
tags: quay.io/michard/cities:${{ env.TAG }},quay.io/michard/cities:latest
notification:
needs: build_and_push
runs-on: ubuntu-latest
steps:
- name: notification
uses: s3krit/matrix-message-action@v0.0.3
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
server: ${{ secrets.MATRIX_SERVER }}
message: |
"${{ github.repository }}":<br />
**new updates pushed to the repository — new container image build**<br />
commit message: **${{ github.event.head_commit.message }}** <br />
contributor: **${{ github.actor }}** <br />
commit sha: **${{ github.sha }}** <br />
commit history: **[link](https://github.com/${{ github.repository }}/commits/main)** <br />
image registry: **[Quay.io](https://quay.io/repository/michard/cities?tab=tags)** <br />