ci #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
run-name: ci | |
on: | |
push: | |
branches: | |
- main | |
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: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: vfarcic # FIXME: yq | |
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: 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 }} |