Skip to content

Commit

Permalink
fix: crd update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur authored Aug 20, 2024
1 parent d0d2c02 commit 3e8f4aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/template-update-crds-go-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ jobs:
repository: ${{ inputs.TARGET_REPO }}
ref: ${{ inputs.TARGET_BRANCH }}
token: ${{ secrets.GH_TOKEN }}
- name: get go version
id: go_version
run: |
echo "go_version="$(grep '^go' go.mod | awk '{ print $2}') >> $GITHUB_OUTPUT
- name: set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ${{ steps.go_version.outputs.go_version }}
go-version-file: 'go.mod'
- name: setup proxy credentials
run: |
cat <<EOF > ~/.netrc
Expand All @@ -37,7 +33,7 @@ jobs:
- name: update go.mod
env:
GONOSUMDB: github.com/traefik/hub-crds
GOPROXY: https://gomod.traefiklabs.tech,https://proxy.golang.org,direct
GOPROXY: https://goproxy.io,https://athens.traefiklabs.tech,direct
run: |
sed -i -e "s|github.com/traefik/hub-crds .*|github.com/traefik/hub-crds ${{ inputs.CRDS_VERSION }}|g" go.mod
go mod tidy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
path: ${{ github.workspace }}/traefik-helm-chart
- name: copy CRDs
run: rsync -crv --delete --exclude='kustomization.yaml' --exclude='traefik.io_*.yaml' --exclude='*.go' ${{ github.workspace }}/hub-crds/pkg/apis/hub/v1alpha1/crd/ ${{ github.workspace }}/traefik-helm-chart/traefik/crds/
run: rsync -crv --delete --exclude='kustomization.yaml' --exclude='gateway-standard-install-*.yaml' --exclude='traefik.io_*.yaml' --exclude='*.go' ${{ github.workspace }}/hub-crds/pkg/apis/hub/v1alpha1/crd/ ${{ github.workspace }}/traefik-helm-chart/traefik/crds/
- name: create PR
uses: peter-evans/create-pull-request@v6
with:
Expand Down

0 comments on commit 3e8f4aa

Please sign in to comment.