Skip to content

Commit

Permalink
Merge pull request #56 from benoitf/use-ghcr
Browse files Browse the repository at this point in the history
chrore: use ghcr.io to publish images
  • Loading branch information
cdrage authored Jan 18, 2024
2 parents f3776e5 + b90faee commit e34e4ea
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/build-next.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2023 Red Hat, Inc.
# Copyright (C) 2023-2024 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,18 +32,17 @@ jobs:
with:
node-version: 18

# disable cache for now to not store any resource on private repo
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "dir=$(npx yarn cache dir)" >> ${GITHUB_OUTPUT}
#
# - uses: actions/cache@v3
# id: yarn-cache
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(npx yarn cache dir)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Execute yarn
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
Expand All @@ -52,13 +51,13 @@ jobs:
- name: Run Build
run: npx yarn build

- name: Login to quay.io
run: podman login --username ${{ secrets.QUAY_USERNAME }} --password ${{ secrets.QUAY_PASSWORD }} quay.io
- name: Login to ghcr.io
run: podman login --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io

- name: Publish Image
id: publish-image
run: |
IMAGE_NAME=quay.io/bootsy/bootc-extension
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/podman-desktop-extension-bootc
IMAGE_LATEST=${IMAGE_NAME}:latest
IMAGE_SHA=${IMAGE_NAME}:${GITHUB_SHA}
podman build -t $IMAGE_LATEST .
Expand Down

0 comments on commit e34e4ea

Please sign in to comment.