WIP: Improve actions
This commit is contained in:
parent
69588d2748
commit
0af9f4b392
|
@ -15,18 +15,6 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: git.huizinga.dev/dreaded_x/${{ gitea.event.repository.name}}
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=sha
|
|
||||||
|
|
||||||
- name: Login to registry
|
- name: Login to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
@ -34,14 +22,47 @@ jobs:
|
||||||
username: ${{ gitea.actor }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: git.huizinga.dev/dreaded_x/${{ gitea.event.repository.name}}
|
||||||
|
tags: |
|
||||||
|
type=edge
|
||||||
|
type=semver,pattern=v{{version}}
|
||||||
|
type=semver,pattern=v{{major}}.{{minor}}
|
||||||
|
type=semver,pattern=v{{major}}
|
||||||
|
type=sha
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: https://github.com/docker/build-push-action@v5
|
id: build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
load: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
- name: Testing 1
|
||||||
|
run: |
|
||||||
|
docker images
|
||||||
|
echo ${{ steps.build.outputs.imageid }}
|
||||||
|
echo ${{ steps.build.outputs.digest }}
|
||||||
|
echo ${{ steps.build.outputs.metadata }}
|
||||||
|
|
||||||
|
- name: Testing 2
|
||||||
|
run: |
|
||||||
|
docker image inspect git.huizinga.dev/dreaded_x/${{ gitea.event.repository.name }}@${{ steps.build.outputs.digest }}
|
||||||
|
|
||||||
|
- name: Generate CRDs
|
||||||
|
run: |
|
||||||
|
docker run --rm git.huizinga.dev/dreaded_x/${{ gitea.event.repository.name }}@${{ steps.build.outputs.digest }} crdgen > ./crds.yaml
|
||||||
|
cat ./crds.yaml
|
||||||
|
|
||||||
manifests:
|
manifests:
|
||||||
name: Publish manifests
|
name: Publish manifests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -80,4 +101,4 @@ jobs:
|
||||||
- name: Tag manifests
|
- name: Tag manifests
|
||||||
run: |
|
run: |
|
||||||
flux tag artifact oci://git.huizinga.dev/dreaded_x/${{ gitea.event.repository.name }}/manifests:sha-$(git rev-parse --short HEAD) \
|
flux tag artifact oci://git.huizinga.dev/dreaded_x/${{ gitea.event.repository.name }}/manifests:sha-$(git rev-parse --short HEAD) \
|
||||||
--tag latest
|
--tag edge
|
||||||
|
|
|
@ -4,6 +4,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
- id: check-toml
|
- id: check-toml
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
|
|
Loading…
Reference in New Issue
Block a user