-
Notifications
You must be signed in to change notification settings - Fork 32
31 lines (29 loc) · 1.04 KB
/
build.yaml
File metadata and controls
31 lines (29 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
on:
workflow_dispatch:
push:
tags:
- '*'
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Set Lowercase Image Tag
id: prep
run: |
IMAGE_TAG="ghcr.io/${{ github.repository }}:${{ github.ref_name }}"
IMAGE_TAG_LOWER=$(echo "$IMAGE_TAG" | tr '[:upper:]' '[:lower:]')
echo "IMAGE_TAG_LOWER=$IMAGE_TAG_LOWER" >> $GITHUB_ENV
- name: Build and Push Multi-Arch Docker Image
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t "$IMAGE_TAG_LOWER" --push .