Skip to content

build rust 1.88 node 22 #25

build rust 1.88 node 22

build rust 1.88 node 22 #25

name: Build and Push Docker Container
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
IMAGE_VERSION: bookworm_rust_1.88-node_22.17.1
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
if: github.event_name == 'push'
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Build and push multi-platform Docker image
run: |
# Build and tag the Docker image with the version
docker buildx create --use
if [ "${{ github.event_name }}" = "push" ]; then
docker buildx build --push \
--tag ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):${{ env.IMAGE_VERSION }} \
--platform linux/amd64,linux/arm64 .
else
docker buildx build \
--platform linux/amd64,linux/arm64 .
fi
env:
DOCKER_CLI_ACI_AS_TEXT: "true"