You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
name: build rgb-board
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- ".gitea/workflows/**"
|
|
workflow_dispatch:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: registry.local/catthehacker-home:act-latest
|
|
volumes:
|
|
- /var/run/user/1000/docker.sock:/var/run/docker.sock
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: short-sha
|
|
id: short-sha
|
|
run: echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
driver-opts: |
|
|
image=registry.local/buildkit-wagnerca:stable-3-rootless
|
|
seccomp=unconfined
|
|
apparmor=unconfined
|
|
systempaths=unconfined
|
|
privileged=false
|
|
- run: docker buildx ls
|
|
- name: build push rgbboard
|
|
uses: docker/build-push-action@master
|
|
#id: build_push_rgbboard
|
|
with:
|
|
push: true
|
|
tags: registry.local/rgbboard:${{ steps.short-sha.outputs.short-sha }}
|
|
platforms: linux/arm64
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: https://gitea.wagshome.duckdns.org/wagshome/rgbboard
|
|
ref: master as # or the branch you want to modify
|
|
token: ${{ secrets.runner_deploy }}
|
|
path: repo
|
|
|
|
- name: Set up Git
|
|
run: |
|
|
git config --global user.name "Gitea Actions"
|
|
git config --global user.email "actions@nope.com"
|
|
|
|
- name: Install yq
|
|
uses: https://github.com/chrisdickinson/setup-yq@v1.0.0
|
|
|
|
- name: Update values.yaml
|
|
run: |
|
|
yq e -i '.image.tag = "my-image:${{ steps.short_sha.outputs.short_sha }}"' rgbboard/rgbboard/values.yaml
|
|
|
|
- name: Commit and Push changes
|
|
run: |
|
|
cd repo
|
|
git add .
|
|
git commit -m "Update image to ${{ steps.short_sha.outputs.short_sha }}"
|
|
git push |