Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vfarcic committed Sep 10, 2024
1 parent b67b6c9 commit fafff9d
Showing 1 changed file with 31 additions and 36 deletions.
67 changes: 31 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@ jobs:
ci:
runs-on: ubuntu-latest
env:
IMAGE: ghcr.io/vfarcic/backstage-demo # FIXME: yq
HELM_REGISTRY: oci://ghcr.io/vfarcic/charts # FIXME: yq
TAG: 0.0.${{ github.run_number }}
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Install Devbox
# uses: jetpack-io/devbox-install-action@v0.11.0
# with:
# enable-cache: true
# - name: Plugins
# run: devbox run plugins
- name: Plugins
run: |
yarn --cwd src/packages/backend add @backstage/plugin-scaffolder-backend-module-github
yarn --cwd src/packages/backend add @backstage/plugin-catalog-backend-module-github
cp packages/backend/src/index.ts src/packages/backend/src/index.ts
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -28,39 +25,37 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: vfarcic # FIXME: yq
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push container image
# uses: docker/build-push-action@v6
# with:
# push: true
# tags: ${{ env.IMAGE }}:${{ env.TAG }},${{ env.IMAGE }}:latest
# build-args: |
# SRC=src
# cache-from: type=registry,ref=user/app:latest
# cache-to: type=inline
# - name: Package
# run: devbox run helm-package
- name: Build and push container image
uses: docker/build-push-action@v6
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ env.TAG }},ghcr.io/${{ github.repository }}:latest
build-args: |
SRC=src
cache-from: type=registry,ref=user/app:latest
cache-to: type=inline
- name: Package Helm
run: |
env
yq --inplace ".version = \"${{ env.TAG }}\"" chart/Chart.yaml
yq --inplace ".appVersion = \"${{ env.TAG }}\"" chart/Chart.yaml
helm package chart
helm push backstage-demo-${{ env.TAG }}.tgz oci://ghcr.io/${{ github.repository }}
# - name: Publish Helm
# uses: actions/upload-artifact@v4
# with:
# name: backstage-demo-helm
# path: backstage-demo-${{ env.TAG }}.tgz
# - name: Commit changes
# run: |
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# git add .
# git commit -m "Release ${{ env.TAG }} [skip ci]"
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}
- name: Publish Helm
uses: actions/upload-artifact@v4
with:
name: backstage-demo-helm
path: backstage-demo-${{ env.TAG }}.tgz
- name: Commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Release ${{ env.TAG }} [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit fafff9d

Please sign in to comment.