From 6b28339b05699418cc4aa7f4ddca8c080f9f9d6e Mon Sep 17 00:00:00 2001 From: Jacob Morgan Date: Sat, 16 Mar 2024 13:12:49 +0100 Subject: [PATCH] Create the release flow attempt 31 --- .github/workflows/release.yaml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..ce60540 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,49 @@ +name: Release v0.1.0 + +on: + push: + tags: + - 'v*' + +jobs: + build-and-push-images: + runs-on: ubuntu-latest + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to GitHub Container Registry + run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Backend Docker image + uses: docker/build-push-action@v2 + with: + context: ./backend + file: ./backend/Dockerfile + push: true + tags: ghcr.io/slackspace-io/slackwatch-be:${{ github.ref_name }} + + - name: Build and push Frontend Docker image + uses: docker/build-push-action@v2 + with: + context: ./frontend + file: ./frontend/Dockerfile + push: true + tags: ghcr.io/slackspace-io/slackwatch-fe:${{ github.ref_name }} + + create-release: + needs: build-and-push-images + runs-on: ubuntu-latest + steps: + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + body: | + - Backend and Frontend Docker images tagged with ${{ github.ref_name }}