chore: publish v0.0.1 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker Image and Publish Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' # Triggers on tag push (e.g., v1.0.0, v1.2.3) | ||
jobs: | ||
build_and_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
- name: Build Docker image | ||
run: | | ||
docker build -t ghcr.io/${{ github.repository }}:${{ github.ref_name }} . | ||
- name: Push Docker image to GitHub Container Registry | ||
run: | | ||
docker push ghcr.io/${{ github.repository }}:${{ github.ref_name }} | ||
- name: Create a GitHub Release | ||
id: release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
./path/to/your/output/files/*.tar.gz # You can include any other artifacts you want to attach to the release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Output Release URL | ||
run: echo "Release URL: ${{ steps.release.outputs.html_url }}" | ||