Skip to content

CHANGELOG.md

CHANGELOG.md #2

Workflow file for this run

name: Docker Image Build Push
on:
push:
tags:
- "*"
concurrency:
group: "docker-image"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate repository name
run: |
echo "REPOSITORY_PATH=$( echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]' )" >> ${GITHUB_ENV}
echo "REPOSITORY_SHA=$( echo ${GITHUB_SHA} | cut -c 1-8 )" >> ${GITHUB_ENV}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v3
with:
context: .
file: ./prod/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: "VERSION=${{ github.ref_name }}\nCARGO_INCREMENTAL=0 \n"
tags: |
ghcr.io/${{ env.REPOSITORY_PATH }}:v${{ github.ref_name }}
ghcr.io/${{ env.REPOSITORY_PATH }}:${{ env.REPOSITORY_SHA }}
ghcr.io/${{ env.REPOSITORY_PATH }}:latest
- name: GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
tag_name: ${{ github.ref_name }}
release_name: v${{ github.ref_name }}
body_path: CHANGELOG.md