Skip to content

v0.1.1

v0.1.1 #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
env:
DOCKER_REPO: bobymicroby
DOCKER_IMAGE: resp-proxy
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run linter
run: bun run lint
- name: Run tests
run: bun test
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Log in to Docker Hub
run: |
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build the Docker image
run: |
docker build -t ${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:latest .
- name: Tag the Docker image
run: |
docker tag ${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:latest ${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ steps.version.outputs.VERSION }}
- name: Push the Docker image to Docker Hub
run: |
docker push ${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:latest
docker push ${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ steps.version.outputs.VERSION }}
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.version.outputs.VERSION }}
body: |
## Docker Image
```bash
docker pull ${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ steps.version.outputs.VERSION }}
```
draft: true
prerelease: false
generate_release_notes: true