33 lines
948 B
YAML
33 lines
948 B
YAML
name: Build and Push Docker Image
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
container:
|
|
image: alpine:latest
|
|
steps:
|
|
- name: Set up and Install Dependencies
|
|
run: |
|
|
apk update && apk add --no-cache mariadb-connector-c-dev && apk add --no-cache gcc musl-dev nodejs npm git docker
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Log in to Docker Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: registry.prod.resk-u.ch
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Build and Push Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: registry.prod.resk-u.ch/reskreen:latest
|
|
|