Skip to content

[+] added Docker Buildx setup to GitHub Actions workflow #1

[+] added Docker Buildx setup to GitHub Actions workflow

[+] added Docker Buildx setup to GitHub Actions workflow #1

Workflow file for this run

name: Deploy XDatabase Proxy
on:
push:
branches:
- development
jobs:
build-and-push:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/development'
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23.4"
- name: Run tests
run: go test -v ./...
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: hasirciogli
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/hasirciogli/xdatabase-proxy-development
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/386