Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable uploads to ghcr.io, upload binaries to github #4368

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
34 changes: 18 additions & 16 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ permissions:
contents: read # for actions/checkout to fetch code

env:
CI_CONTAINER_REGISTRY: europe-west1-docker.pkg.dev
CI_CONTAINER_REPOSITORY: europe-west1-docker.pkg.dev/weave-gitops-clusters/weave-gitops
CI_CONTAINER_REGISTRY: ghcr.io
CI_CONTAINER_REPOSITORY: ghcr.io/weaveworks/weave-gitops

name: PR CI Workflow
jobs:
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
path: /tmp/${{ matrix.docker-image }}.tar

ci-upload-images:
name: CI Upload Images - Disabled
name: CI Upload Images
runs-on: ubuntu-latest
# Make sure we only upload images if tests etc have passed
needs: [ci-go, ci-static, ci-js, ci-build-gitops-image, ci-generate-tag]
Expand All @@ -138,21 +138,15 @@ jobs:
with:
name: ${{ matrix.docker-image }}
path: /tmp
# - name: Authenticate to Google Cloud
# id: gcloud-auth
# uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
# with:
# service_account: ${{ secrets.service_account }}
# workload_identity_provider: ${{ secrets.workload_identity_provider }}
# - name: Login to gcloud for docker
# run: gcloud --quiet auth configure-docker ${{ env.CI_CONTAINER_REGISTRY }}
# - name: Push images to gcloud
# run: |
# docker load --input /tmp/${{ matrix.docker-image }}.tar
# docker push "${{ env.CI_CONTAINER_REPOSITORY }}/${{ matrix.docker-image }}:${{ needs.ci-generate-tag.outputs.tag }}"
- name: Login to GHCR
run: echo ${{ secrets.WEAVE_GITOPS_BOT_ACCESS_TOKEN }} | docker login ghcr.io -u weaveworks --password-stdin
- name: Push images to GHCR
run: |
docker load --input /tmp/${{ matrix.docker-image }}.tar
docker push "${{ env.CI_CONTAINER_REPOSITORY }}/${{ matrix.docker-image }}:${{ needs.ci-generate-tag.outputs.tag }}"

ci-upload-binary:
name: Upload Binary - Disabled
name: Upload Binary
runs-on: ${{matrix.os}}
needs: [ci-go, ci-static, ci-js, ci-build-gitops-image]
strategy:
Expand All @@ -175,6 +169,14 @@ jobs:
- name: build
run: |
make gitops
- name: publish to github artifacts
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
- bin/gitops-${{matrix.os}}-${{steps.gitsha.outputs.sha}}
- bin/gitops-server

# - name: publish to s3
# uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
# with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
jq '.version = "'$GITOPS_VERSION'"' < package.json > package-new.json
mv package-new.json package.json
yarn
yarn test -- -u
yarn test -u
git commit -am "Update javascript library version to $GITOPS_VERSION"

- name: Update Chart
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ jobs:
run: |
git fetch --prune --unshallow
git fetch --tags -f
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.WEAVEWORKS_ORG_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.WEAVEWORKS_ORG_GPG_PRIVATE_KEY_PASSPHRASE }}
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
Expand Down Expand Up @@ -166,6 +172,11 @@ jobs:
BRANCH: ${{ env.BRANCH }}
GORELEASER_PREVIOUS_TAG: ${{ env.GORELEASER_PREVIOUS_TAG }}
GORELEASER_CURRENT_TAG: ${{ env.GORELEASER_CURRENT_TAG }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

signs:
- artifacts: checksum
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]

merge-pr:
runs-on: ubuntu-latest
Expand Down
15 changes: 15 additions & 0 deletions keys/Weaveworks-Notary-Bot.pub.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mDMEZ3ekVBYJKwYBBAHaRw8BAQdAVL/nyYue+WbwLsiY12Xd1iVUR872nULq+Xcb
Y5esUT20WVdlYXZld29ya3MuT3JnIE5vdGFyeSBCb3QgKEF1dG9tYXRpb24ga2V5
IGZvciByZWxlYXNlcyBvbiBHaXRIdWIpIDxub3RhcnlAd2VhdmV3b3Jrcy5vcmc+
iJkEExYKAEEWIQRt2wWMZfiSESijWP5XJETOkMim+AUCZ3ekVAIbAwUJBi4IAAUL
CQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgAAKCRBXJETOkMim+ATLAQDsd5Bzt81l
b4JOMM+6NdM5QagGRdKUNWvDlvAR8xj4awD8CXqVZtzEnv/u4k/9LFbB+u+wYapH
ptd/PzrMrz52HQi4OARnd6RUEgorBgEEAZdVAQUBAQdA1uqx0gwl4CoS7lmqf4Gu
HrxM4ID3KYxH25/0tXOiGDoDAQgHiH4EGBYKACYWIQRt2wWMZfiSESijWP5XJETO
kMim+AUCZ3ekVAIbDAUJBi4IAAAKCRBXJETOkMim+HNlAQDvvTHCmlWtKGpBSjFH
rNkQZ1+pV9Pna56DLixCJYoS8gEAi0iy39QINrBFB/GnIYEnikeuJ5bxy1ENJNmd
uOU0wQs=
=KAYZ
-----END PGP PUBLIC KEY BLOCK-----
Loading