chore: cleanup and add build workflow
Some checks failed
Release / build-image (push) Failing after 4s
Some checks failed
Release / build-image (push) Failing after 4s
This commit is contained in:
parent
14c76b97a3
commit
8b3225963e
11 changed files with 58 additions and 33 deletions
10
.forgejo/templates/release-notes-template.md
Normal file
10
.forgejo/templates/release-notes-template.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
Release notes are coming up next!
|
||||
|
||||
We'll be describing:
|
||||
|
||||
- What's new
|
||||
- How your experience improves
|
||||
- If there's any known issues you should know about
|
||||
- Any considerations we're aware of that you should know about when upgrading
|
||||
|
||||
We'll also provide a link to the changelog.
|
42
.forgejo/workflows/image-publish.yml
Normal file
42
.forgejo/workflows/image-publish.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'src/**'
|
||||
- Dockerfile
|
||||
- .forgejo/workflows/build.yaml
|
||||
|
||||
release:
|
||||
types: [ "published" ]
|
||||
paths:
|
||||
- 'src/**'
|
||||
- Dockerfile
|
||||
- .forgejo/workflows/build.yaml
|
||||
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: ci-os
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract Chart Version
|
||||
run: |
|
||||
CHART_VERSION=$(yq -r .appVersion "chart/Chart.yaml")
|
||||
echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push
|
||||
uses: actions/kaniko-action@latest
|
||||
with:
|
||||
cache: false
|
||||
context: /workspace/${{ github.repository }}
|
||||
docker_file: Dockerfile
|
||||
credentials: |
|
||||
code.252.no=${{ github.repository_owner }}:${{ secrets.REGISTRY_TOKEN }}
|
||||
destinations: "code.252.no/pub/external-dns-domeneshop-webhook:${{ env.CHART_VERSION }}"
|
||||
push: 'true'
|
30
.github/workflows/image-publish.yml
vendored
30
.github/workflows/image-publish.yml
vendored
|
@ -1,30 +0,0 @@
|
|||
name: Deploy Images to GHCR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push-image:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: './'
|
||||
steps:
|
||||
- name: 'Checkout GitHub Action'
|
||||
uses: actions/checkout@main
|
||||
|
||||
- name: 'Login to GitHub Container Registry'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{github.actor}}
|
||||
password: ${{secrets.GHCR_TOKEN}}
|
||||
|
||||
- name: 'Build Inventory Image'
|
||||
run: |
|
||||
docker build . --tag ghcr.io/${{ github.actor }}/external-dns-domeneshop-webhook:latest
|
||||
docker push ghcr.io/${{ github.actor }}/external-dns-domeneshop-webhook:latest
|
|
@ -5,14 +5,14 @@
|
|||
|
||||
# Stage 1 (to create a "build" image, ~850MB)
|
||||
FROM golang:1.22.0 AS builder
|
||||
LABEL org.opencontainers.image.source="https://github.com/vidarno/external-dns-domeneshop-webhook"
|
||||
LABEL org.opencontainers.image.source="https://code.252.no/pub/external-dns-domeneshop-webhook"
|
||||
|
||||
WORKDIR /src/
|
||||
COPY go.mod go.sum ./
|
||||
COPY src/go.src/mod src/go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY ./ ./
|
||||
COPY src/ ./
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
go build \
|
||||
|
|
3
renovate.json
Normal file
3
renovate.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||
}
|
Loading…
Add table
Reference in a new issue