From 6e8dbb56334cbcad4d2c54d023757415bd2769d5 Mon Sep 17 00:00:00 2001 From: Gertjan Krol Date: Tue, 7 Nov 2023 21:04:19 +0100 Subject: [PATCH] Added Forgejo workflows --- .forgejo/workflows/release.yaml | 26 ++++++++++++++++++++++++++ .forgejo/workflows/test-build.yaml | 20 ++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .forgejo/workflows/release.yaml create mode 100644 .forgejo/workflows/test-build.yaml diff --git a/.forgejo/workflows/release.yaml b/.forgejo/workflows/release.yaml new file mode 100644 index 0000000..ecedf29 --- /dev/null +++ b/.forgejo/workflows/release.yaml @@ -0,0 +1,26 @@ +name: Release +on: + push: + tags: + - '*' + +jobs: + build_push: + runs-on: ubuntu-latest + container: git.gertjankrol.nl/docker/toolkit:latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + - name: Docker login + uses: actions/docker-login@v2 + with: + registry: ${{secrets.DOCKER_REGISTRY}} + username: ${{secrets.DOCKER_USERNAME}} + password: ${{secrets.DOCKER_PASSWORD}} + - name: Build and push Unbound image + uses: actions/docker-build-push@v4 + with: + tags: | + ${{secrets.DOCKER_REGISTRY}}/${{github.repository}}:${{github.ref_name}} + ${{secrets.DOCKER_REGISTRY}}/${{github.repository}}:latest + push: true diff --git a/.forgejo/workflows/test-build.yaml b/.forgejo/workflows/test-build.yaml new file mode 100644 index 0000000..7e8d7fc --- /dev/null +++ b/.forgejo/workflows/test-build.yaml @@ -0,0 +1,20 @@ +name: Test +on: + push: + branches: + - '*' + +jobs: + test_build: + runs-on: ubuntu-latest + container: git.gertjankrol.nl/docker/toolkit:latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + - name: Build Unbound image + uses: actions/docker-build-push@v4 + with: + tags: unbound-test:${{github.ref_name}} + push: false + - name: Unbound image details + run: docker image inspect unbound-test:${{github.ref_name}}