Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 18 additions & 27 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
name-template: "$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: '🚀 Features'
- title: "🚀 Features"
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧹 Maintenance'
- "bug"
- title: "🧰 Maintenance"
labels:
- 'chore'
- 'dependencies'
version-resolver:
major:
- "maintenance"
- title: "📦 Dependencies"
labels:
- 'feature'
minor:
- "docker dependency"
- "github dependency"
- "go dependency"
- title: "✏️ Documentation"
labels:
- 'enhancement'
patch:
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'chore'
- 'dependencies'
default: patch
- "documentation"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
exclude-labels:
- "skip-changelog"
template: |
## Changes
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
17 changes: 17 additions & 0 deletions .github/workflows/autodev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Autodev

on:
push:
branches-ignore: [dev]
pull_request:
types: [labeled, unlabeled, closed]

jobs:
autodev:
uses: Staffbase/gha-workflows/.github/workflows/[email protected]
with:
labels: true
secrets:
app_id: ${{ vars.STAFFBASE_ACTIONS_APP_ID }}
private_key: ${{ secrets.STAFFBASE_ACTIONS_PRIVATE_KEY }}
80 changes: 80 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: Build & Deploy

on:
push:
branches:
- main
- dev
pull_request:
types: [opened, synchronize, reopened]
release:
types: [published]

jobs:
test:
name: Test
runs-on: ubuntu-24.04
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Test
run: go test ./...

- name: Build
run: go build -o ./yamllint-action .

push:
name: Push
needs: test
runs-on: ubuntu-24.04
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Docker Metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: |
staffbase/yamllint-action
tags: |
type=ref,event=branch
type=semver,pattern={{raw}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and Push Docker Image
id: docker_build
uses: docker/build-push-action@v6
with:
push:
${{ github.event_name == 'release' && github.event.action ==
'published' }}
context: .
file: ./Dockerfile
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
55 changes: 0 additions & 55 deletions .github/workflows/ci.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/release-drafter.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Release Drafter

on:
push:
branches:
- main

jobs:
release:
uses: Staffbase/gha-workflows/.github/workflows/[email protected]
secrets:
app_id: ${{ vars.STAFFBASE_ACTIONS_APP_ID }}
private_key: ${{ secrets.STAFFBASE_ACTIONS_PRIVATE_KEY }}
34 changes: 0 additions & 34 deletions .github/workflows/release.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .goreleaser.yml

This file was deleted.

15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.13.1-alpine3.19

WORKDIR /go/src/github.com/Staffbase/yamllint-action
FROM golang:1.24.1 AS build
WORKDIR /yamllint-action
COPY go.mod go.sum /yamllint-action/
RUN go mod download
COPY . .
RUN export CGO_ENABLED=0 && go build -o ./yamllint-action .

FROM python:3.13.1-alpine3.19
RUN pip install --no-cache-dir yamllint==1.35.1 && \
adduser --disabled-password --gecos "" --home "/nonexistent" --shell "/sbin/nologin" --no-create-home --uid 10001 appuser

COPY yamllint-action /yamllint-action
COPY --from=build /yamllint-action/yamllint-action /script_exporter
COPY entrypoint.sh /entrypoint.sh

USER appuser:appuser

ENTRYPOINT ["/entrypoint.sh"]
Loading