major: PR check and release tweaks

This commit is contained in:
Rasmus Wejlgaard 2026-04-22 20:56:59 +01:00
parent 0f1a13eaeb
commit d41af728c6
2 changed files with 32 additions and 9 deletions

23
.github/workflows/pr-check.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: PR Check
on:
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
push: false
platforms: linux/amd64,linux/arm64

View file

@ -48,12 +48,8 @@ jobs:
echo "New version: $NEW_VERSION"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Tag release
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag ${{ steps.version.outputs.version }}
git push origin ${{ steps.version.outputs.version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -64,9 +60,6 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
@ -75,3 +68,10 @@ jobs:
tags: |
rwejlgaard/octopus_exporter:${{ steps.version.outputs.version }}
rwejlgaard/octopus_exporter:latest
- name: Tag release
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag ${{ steps.version.outputs.version }}
git push origin ${{ steps.version.outputs.version }}