Skip to content

xgo Docker

xgo Docker #10

Workflow file for this run

name: xgo Docker
on:
workflow_dispatch: {}
push:
branches: [ master ]
paths:
- 'ci/xgo/Dockerfile'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/pangbox/pangfiles/xgo
tags: |
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check out code
uses: actions/checkout@v4
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
load: true
tags: |
${{ steps.meta.outputs.tags }}
localhost/xgo:latest
labels: ${{ steps.meta.outputs.labels }}
file: ci/xgo/Dockerfile
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Test Build
run: bash ci/xgo/xgo-build.sh localhost/xgo:latest
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ci/xgo/Dockerfile