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

ci: publish image #53

Merged
merged 2 commits into from
Dec 9, 2024
Merged
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
17 changes: 6 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
push:
branches:
- main
- release-*
tags:
- v*
pull_request: {}
workflow_dispatch: {}

Expand All @@ -13,10 +14,6 @@ env:
GO_VERSION: '1.23'
DOCKER_BUILDX_VERSION: 'v0.18.0'

# Common users. We can't run a step 'if secrets.XXX != ""' but we can run a
# step 'if env.XXX' != ""', so we copy these to succinctly test whether
# credentials have been provided before trying to run steps that need them.
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
jobs:
detect-noop:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -191,13 +188,12 @@ jobs:
version: ${{ env.DOCKER_BUILDX_VERSION }}
install: true

- name: Login to Upbound
- name: Login to Container Registry
uses: docker/login-action@v3
if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != ''
with:
registry: xpkg.upbound.io
username: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
password: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -247,5 +243,4 @@ jobs:
path: _output/**

- name: Publish Artifacts
if: env.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR != ''
run: make publish BRANCH_NAME=${GITHUB_REF##*/}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ GO111MODULE = on
# ====================================================================================
# Setup Images

DOCKER_REGISTRY = ghcr.io/statnett
XPKG_REG_ORGS = $(DOCKER_REGISTRY)
XPKG_REG_ORGS_NO_PROMOTE = $(DOCKER_REGISTRY)
IMAGES = provider-cloudian
-include build/makelib/imagelight.mk

Expand Down
Loading