Skip to content

Commit c3c628c

Browse files
committed
ci: publish to ghcr
1 parent fe6b3b1 commit c3c628c

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

.github/workflows/push.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@ on:
1616
default: current
1717

1818
env:
19-
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
19+
REGISTRY: ghcr.io
2020

2121
jobs:
2222
build:
2323
runs-on: ubuntu-22.04
24+
25+
permissions:
26+
contents: read
27+
packages: write
28+
2429
steps:
2530
- name: Checkout
2631
uses: actions/checkout@v4
@@ -32,13 +37,12 @@ jobs:
3237
version: ${{ github.event.inputs.version }}
3338
command: -h
3439

35-
- name: Login to Upbound
36-
uses: docker/login-action@v3
37-
if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != ''
40+
- name: Log in to the GitHub Container registry
41+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
3842
with:
39-
registry: xpkg.upbound.io
40-
username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
41-
password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
43+
registry: ${{ env.REGISTRY }}
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
4246

4347
- name: Push xpkg
4448
run: make push

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ LIBRARY_VERSION:=0.0.5
22
PROVIDER_VERSION:=0.21.0
33
JSONNET_BIN:=jrsonnet
44
CROSSPLANE?=crank
5+
REGISTRY?=ghcr.io
56

67
VENDOR_DEPTHS:=$(shell find generator/vendor -type f)
78

@@ -35,7 +36,7 @@ packages=$(wildcard packages/*)
3536
push_packages: packages $(packages)
3637
rm -rf output && mkdir -p output/
3738
$(foreach pkg,$(packages),$(CROSSPLANE) xpkg build --package-root=$(pkg) --package-file=output/$(patsubst packages/%,%,$(pkg)).xpkg;)
38-
$(foreach pkg,$(packages),$(CROSSPLANE) xpkg push -f output/$(patsubst packages/%,%,$(pkg)).xpkg registry.upbound.io/grafana/$(patsubst packages/%,%,$(pkg)):$(LIBRARY_VERSION)-$(PROVIDER_VERSION);)
39+
$(foreach pkg,$(packages),$(CROSSPLANE) xpkg push -f output/$(patsubst packages/%,%,$(pkg)).xpkg $(REGISTRY)/grafana/crossplane/$(patsubst packages/%,%,$(pkg)):$(LIBRARY_VERSION)-$(PROVIDER_VERSION);)
3940

4041
docs: $(shell find grafanaplane/ -type f)
4142
@rm -rf docs/

0 commit comments

Comments
 (0)