2024-07-02 14:24:07 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# generic
|
2024-07-02 14:34:49 +02:00
|
|
|
name: 'Build and Publish'
|
2024-07-02 14:24:07 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-07-25 09:33:07 +02:00
|
|
|
- 'main'
|
2024-07-02 14:24:07 +02:00
|
|
|
|
|
|
|
# build job
|
|
|
|
jobs:
|
2024-07-04 16:05:56 +02:00
|
|
|
Build:
|
2024-07-02 14:24:07 +02:00
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
|
|
|
|
# checkout code
|
2024-07-02 14:34:49 +02:00
|
|
|
- name: 'Clone repo'
|
2024-07-02 17:43:11 +02:00
|
|
|
uses: 'actions/checkout@v4'
|
2024-07-02 14:24:07 +02:00
|
|
|
|
|
|
|
# login to cr.simoncor.net
|
2024-07-02 14:34:49 +02:00
|
|
|
- name: 'Login to cr.simoncor.net'
|
2024-07-02 17:38:48 +02:00
|
|
|
uses: 'docker/login-action@v3'
|
2024-07-02 14:24:07 +02:00
|
|
|
with:
|
|
|
|
registry: 'cr.simoncor.net'
|
|
|
|
username: ${{ vars.REGISTER_USERNAME }}
|
|
|
|
password: ${{ vars.REGISTER_PASSWORD }}
|
|
|
|
|
2024-07-02 14:34:49 +02:00
|
|
|
# build and publish container
|
|
|
|
- name: 'Build and Publish'
|
2024-07-02 17:38:37 +02:00
|
|
|
uses: 'docker/build-push-action@v6'
|
2024-07-02 14:24:07 +02:00
|
|
|
with:
|
|
|
|
context: '.'
|
|
|
|
file: 'Dockerfile.linux.amd64'
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
cr.simoncor.net/siempie/ansible-deployment:latest
|
|
|
|
cr.simoncor.net/siempie/ansible-deployment:v30
|