Skip to content

Commit

Permalink
Github: Attempt new release with new actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pier-oliviert committed Oct 17, 2024
1 parent 30099fd commit 68da08e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 16 deletions.
50 changes: 41 additions & 9 deletions .github/workflows/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write
attestations: write
id-token: write
Expand All @@ -28,18 +28,50 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/pier-oliviert/phonebook

- name: Controller
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.controller
context: .
target: controller
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: |
${{ env.REGISTRY }}/${{github.repository}}:latest
${{ env.REGISTRY }}/${{github.repository}}:${{github.event.release.tag_name}}
- name: "Providers: AWS"
id: aws
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: aws
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-aws:latest
${{ env.REGISTRY }}/pier-oliviert/providers-aws:${{github.event.release.tag_name}}
- name: "Providers: Azure"
id: azure
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: azure
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-azure:latest
${{ env.REGISTRY }}/pier-oliviert/providers-azure:${{github.event.release.tag_name}}
- name: "Providers: Cloudflare"
id: cloudflare
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
file: ${{ github.workspace }}/Dockerfile.providers
context: .
target: cloudflare
push: true
tags: |
${{ env.REGISTRY }}/pier-oliviert/providers-cloudflare:latest
${{ env.REGISTRY }}/pier-oliviert/providers-cloudflare:${{github.event.release.tag_name}}
3 changes: 3 additions & 0 deletions Dockerfile.providers
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ RUN go mod download
## AWS
FROM source AS aws-builder

COPY api/ api/
COPY pkg/ pkg/
COPY internal/ internal/
COPY cmd/providers/aws/main.go cmd/main.go

RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o controller cmd/main.go
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require (
github.com/onsi/gomega v1.33.1
github.com/pier-oliviert/konditionner v0.2.5
github.com/stretchr/testify v1.9.0
k8s.io/api v0.31.1
k8s.io/apimachinery v0.31.1
k8s.io/apiserver v0.31.1
k8s.io/client-go v0.31.1
k8s.io/kubernetes v1.31.1
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6
sigs.k8s.io/controller-runtime v0.19.0
)
Expand All @@ -32,7 +32,6 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/stretchr/objx v0.5.2 // indirect
golang.org/x/crypto v0.27.0 // indirect
k8s.io/api v0.31.1 // indirect
)

require (
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ k8s.io/kms v0.31.1 h1:cGLyV3cIwb0ovpP/jtyIe2mEuQ/MkbhmeBF2IYCA9Io=
k8s.io/kms v0.31.1/go.mod h1:OZKwl1fan3n3N5FFxnW5C4V3ygrah/3YXeJWS3O6+94=
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo=
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA=
k8s.io/kubernetes v1.31.1 h1:1fcYJe8SAhtannpChbmnzHLwAV9Je99PrGaFtBvCxms=
k8s.io/kubernetes v1.31.1/go.mod h1:/YGPL//Fb9mdv5vukvAQ7Xon+Bqwry52bmjTdORAw+Q=
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI=
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY=
Expand Down
6 changes: 3 additions & 3 deletions pkg/providers/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Provider interface {
}

var ProviderImages = map[string]string{
"aws": "ghcr.io/pier-oliviert/providers-aws:0.0.1",
"azure": "ghcr.io/pier-oliviert/providers-azure:0.0.1",
"cloudflare": "ghcr.io/pier-oliviert/providers-cloudflare:0.0.1",
"aws": "ghcr.io/pier-oliviert/providers-aws:0.3.4",
"azure": "ghcr.io/pier-oliviert/providers-azure:0.3.4",
"cloudflare": "ghcr.io/pier-oliviert/providers-cloudflare:0.3.4",
}

0 comments on commit 68da08e

Please sign in to comment.