Skip to content

Commit

Permalink
lint: convert CRLF to LF and add newline at the end of file
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol authored May 16, 2024
1 parent c5003b3 commit fb4e584
Show file tree
Hide file tree
Showing 20 changed files with 1,073 additions and 1,099 deletions.
22 changes: 11 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
120 changes: 60 additions & 60 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
---
name: Developer image
on: # yamllint disable-line rule:truthy
push:
branches: [main]
paths-ignore:
- 'README.md'
- 'sample-config.conf'
- 'sample-config.yaml'
- '.github/**'

jobs:
check_versions:
name: Develop - Version checking
runs-on: ubuntu-latest
outputs:
version: ${{ steps.sogo.outputs.VERSION }}
steps:
- name: Get latest version of SOGo
id: sogo
run: |
echo "VERSION=$(curl -s https://api.github.com/repos/Alinto/sogo/releases/latest | jq -r '.tag_name' | sed 's/SOGo-//')" >> "$GITHUB_OUTPUT"
# Builds the Dockerfile and pushes it to dockerhub and GHCR
develop:
name: Develop - Docker image
needs: check_versions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker - GHCR Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Docker - Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: type=raw,value=dev
flavor: latest=false

- name: Docker - Build / Push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
---
name: Developer image
on: # yamllint disable-line rule:truthy
push:
branches: [main]
paths-ignore:
- 'README.md'
- 'sample-config.conf'
- 'sample-config.yaml'
- '.github/**'

jobs:
check_versions:
name: Develop - Version checking
runs-on: ubuntu-latest
outputs:
version: ${{ steps.sogo.outputs.VERSION }}
steps:
- name: Get latest version of SOGo
id: sogo
run: |
echo "VERSION=$(curl -s https://api.github.com/repos/Alinto/sogo/releases/latest | jq -r '.tag_name' | sed 's/SOGo-//')" >> "$GITHUB_OUTPUT"
# Builds the Dockerfile and pushes it to dockerhub and GHCR
develop:
name: Develop - Docker image
needs: check_versions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker - GHCR Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Docker - Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: type=raw,value=dev
flavor: latest=false

- name: Docker - Build / Push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
SOGO_VERSION=${{ needs.check_versions.outputs.version }}
114 changes: 57 additions & 57 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
name: Push - Helm Chart
on:
push:
branches: [main]

jobs:
helm-chart-releaser:
name: Helm - Chart releaser
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
packages: write
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Git - Configure
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: OCI - Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Pushes updates to index.yaml found in the gh-pages branch when a new version is detected
- name: Helm - chart-releaser
uses: helm/[email protected]
with:
charts_dir: charts
pages_branch: gh-pages
mark_as_latest: false
skip_existing: true
config: ./charts/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Helm - OCI Push to GHCR
run: |
if [ -z "$(ls -A .cr-release-packages)" ]; then
echo "No packages found under .cr-release-packages/"
exit 0
fi
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
REPO="${{ github.repository }}"
echo "Pushing $pkg to ghcr.io/${REPO,,}"
helm push "$pkg" "oci://ghcr.io/${REPO,,}"
name: Push - Helm Chart
on:
push:
branches: [main]

jobs:
helm-chart-releaser:
name: Helm - Chart releaser
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
packages: write
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Git - Configure
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: OCI - Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Pushes updates to index.yaml found in the gh-pages branch when a new version is detected
- name: Helm - chart-releaser
uses: helm/[email protected]
with:
charts_dir: charts
pages_branch: gh-pages
mark_as_latest: false
skip_existing: true
config: ./charts/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Helm - OCI Push to GHCR
run: |
if [ -z "$(ls -A .cr-release-packages)" ]; then
echo "No packages found under .cr-release-packages/"
exit 0
fi
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
REPO="${{ github.repository }}"
echo "Pushing $pkg to ghcr.io/${REPO,,}"
helm push "$pkg" "oci://ghcr.io/${REPO,,}"
done
Loading

0 comments on commit fb4e584

Please sign in to comment.