Skip to content

Bumped dependencies #31

Bumped dependencies

Bumped dependencies #31

on:
push:
paths:
- "src/**"
- "Cargo*"
- "Dockerfile"
tags:
- "v*.*.*"
name: Build and push image
jobs:
build-and-push:
name: Build and push image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set some variables for the image
run: |
echo "IMAGE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Build and push the image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }}