From 450878e7008d5c47e9074609646951d59b9058dc Mon Sep 17 00:00:00 2001 From: Robert Jonczy Date: Tue, 16 Apr 2024 10:51:53 +0200 Subject: [PATCH 1/2] release --- .github/workflows/release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..05467bf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Main + +on: + push: + tags: + - "v*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true \ No newline at end of file From b719f5aafac6960b6707674cae090918eadce46e Mon Sep 17 00:00:00 2001 From: Robert Jonczy Date: Tue, 16 Apr 2024 10:55:24 +0200 Subject: [PATCH 2/2] build and push docker image --- .github/workflows/docker-build.yml | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..615cd2f --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,51 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + tags: + - 'v*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Check out the code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (branch, tags, sha) + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=${{ github.ref_name }}-${{ github.run_id }}-${{ github.sha }} + type=semver,pattern=v* + + - name: Build and Push Docker Image + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} +