build(docker): add Docker support and GitHub Actions workflow for Doc… #1
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: Publish Docker | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: mauvehed | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker Image | |
run: | | |
docker build -t ghcr.io/${{ github.repository_owner }}/yourip-app:latest . | |
docker tag ghcr.io/${{ github.repository_owner }}/yourip-app:latest ghcr.io/${{ github.repository_owner }}/yourip-app:${{ github.ref_name }} | |
- name: Push Docker Image | |
run: | | |
docker push ghcr.io/${{ github.repository_owner }}/yourip-app:latest | |
docker push ghcr.io/${{ github.repository_owner }}/yourip-app:${{ github.ref_name }} |