fix: Electricity Maps test and go releaser version (#85) #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
- 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@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- 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@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |