Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Commit

Permalink
chore: modfiy github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Brad McCoy <[email protected]>
  • Loading branch information
bradmccoydev committed Nov 8, 2022
1 parent fad417c commit 1575f10
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/helm-chart-releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:

- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: chart
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:

jobs:
package:
permissions:
contents: write # needed to write releases
packages: write # needed for ghcr access
id-token: write # needed for keyless signing

name: Package
runs-on: ubuntu-latest
steps:
Expand All @@ -28,12 +33,19 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download artifact
Expand All @@ -46,7 +58,9 @@ jobs:
id: metadata
uses: docker/metadata-action@v3
with:
images: ${{ steps.variables.outputs.image }}
images: |
bradmccoydev/backstage:${{ inputs.type }}
${{ steps.variables.outputs.image }}:0.0.1
tags: |
type=ref,event=branch
type=ref,event=pr
Expand All @@ -63,7 +77,10 @@ jobs:
with:
context: .
file: ${{ steps.variables.outputs.dockerfile }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
4 changes: 0 additions & 4 deletions chart/backstage/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Default values for backstage.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- Override the name of the chart.
nameOverride: ""
# -- Override the fullname of the chart.
Expand Down
3 changes: 3 additions & 0 deletions packages/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM nginx:mainline

LABEL org.opencontainers.image.source=https://github.com/ortelius/backstage
LABEL org.opencontainers.image.description="Ortelius Backstage Frontend"

RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*

# RUN set -eu; \
Expand Down
3 changes: 3 additions & 0 deletions packages/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

FROM node:16-bullseye-slim

LABEL org.opencontainers.image.source=https://github.com/ortelius/backstage
LABEL org.opencontainers.image.description="Ortelius Backstage Backend"

# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
Expand Down

0 comments on commit 1575f10

Please sign in to comment.