Skip to content
name: Build Docker image of the geodds-api component and push to the dev repository
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Docker image tag name
run: echo "TAG=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_ENV
- name: Login to Scaleway Container Registry
uses: docker/login-action@v2
with:
username: nologin
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ secrets.DOCKER_DEV_REPO_URL }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
build-args: |
REGISTRY=${{ secrets.DOCKER_DEV_REPO_URL }}
tags: |
${{ secrets.DOCKER_DEV_REPO_URL }}/geodds-api:${{ env.TAG }}
${{ secrets.DOCKER_DEV_REPO_URL }}/geodds-api:latest