Skip to content

ci: Update WSL distribution to ubuntu 24.04 in test workflow #161

ci: Update WSL distribution to ubuntu 24.04 in test workflow

ci: Update WSL distribution to ubuntu 24.04 in test workflow #161

Workflow file for this run

name: Docker
on:
push:
branches:
- master
- v*.*
tags:
- 'v*.*.*'
env:
IMAGE_ID: ghcr.io/anlab-kaist/kens
IMAGE_NAME: kens
jobs:
push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push multi-arch image to GitHub Container Registry
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
[[ "${{ github.ref }}" == "refs/heads/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--push \
--tag $IMAGE_ID:$VERSION \
.