Skip to content

Commit

Permalink
ci: publish image
Browse files Browse the repository at this point in the history
  • Loading branch information
tenstad committed Dec 5, 2024
1 parent 0293409 commit 2c9ab85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
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##*/}
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GO111MODULE = on
# ====================================================================================
# Setup Images

DOCKER_REGISTRY = ghcr.io/statnett
IMAGES = provider-cloudian
-include build/makelib/imagelight.mk

Expand Down

0 comments on commit 2c9ab85

Please sign in to comment.