Skip to content

fmt

fmt #18

name: docker_release
on:
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
tags: [ 'v*.*.*' ]
jobs:
build_and_push:
name: build_and_push_docker_image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Go build
run: CGO_ENABLED=0 GOOS=linux go build -o grid-intensity .
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
rg.fr-par.scw.cloud/funcscwtgwfiljyy2ym/grid-intensity
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Scaleway Registry
uses: docker/login-action@v2
with:
registry: rg.fr-par.scw.cloud/funcscwtgwfiljyy2ym
username: ${{ secrets.SCALEWAY_REGISTRY_USERNAME }}
password: ${{ secrets.SCALEWAY_REGISTRY_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}