Skip to content

Commit

Permalink
feat: Fix workflow (#7)
Browse files Browse the repository at this point in the history
* fix: test workflow for docker/helm/go

* fix: test workflow for docker/helm/go
  • Loading branch information
Richard87 authored Oct 11, 2024
1 parent 23f535a commit d91ffca
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 34 deletions.
30 changes: 1 addition & 29 deletions .github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Build Docker Image

on:
release:
types: [created]
push:
branches:
- main
pull_request: {}
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -57,30 +56,3 @@ jobs:
platforms: |
linux/amd64
linux/arm64
build-helm-chart:
name: Build Helm chart
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
80 changes: 80 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build Release Docker Image

on:
push:
tags:
- 'v*'

jobs:

build-container-image:
name: Build container image
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

permissions:
contents: read
packages: write

steps:
- name: Check out code
uses: actions/checkout@v4

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

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
tags: |
type=semver
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: |
linux/amd64
linux/arm64
build-helm-chart:
name: Build Helm chart
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"packages": {
"charts/radix-prometheus-proxy": {
"release-type": "helm",
"package-name": "radix-prometheus-proxy-chart"
},
".": {
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false,
"initial-version": "0.1.0",
"release-type": "go"
"release-type": "simple"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
Expand Down

0 comments on commit d91ffca

Please sign in to comment.