Update README.md #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Deployment | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Create release | |
id: release-please | |
uses: google-github-actions/release-please-action@v4 | |
with: | |
release-type: python | |
- | |
name: Checkout Codebase | |
if: ${{ steps.release-please.outputs.release_created }} | |
uses: actions/checkout@v4 | |
- | |
name: Collecting Metadata | |
if: ${{ steps.release-please.outputs.release_created }} | |
id: metadata | |
run: | | |
IMAGE="chimefrb/voe" | |
TAG=${{ steps.release-please.outputs.tag_name }} | |
echo ::set-output name=latest_image::${IMAGE}:latest | |
echo ::set-output name=tag_image::${IMAGE}:${TAG} | |
- | |
name: Setup docker-buildx | |
if: ${{ steps.release-please.outputs.release_created }} | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
with: | |
install: true | |
- | |
name: Perform docker-login | |
if: ${{ steps.release-please.outputs.release_created }} | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Build & Push docker image | |
if: ${{ steps.release-please.outputs.release_created }} | |
uses: docker/build-push-action@v2 | |
id: build | |
with: | |
context: . | |
file: Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
${{ steps.metadata.outputs.latest_image }} | |
${{ steps.metadata.outputs.tag_image }} | |
${{ steps.metadata.outputs.sha_image }} | |
# This build does not use ssh-agent | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |