Skip to content

build(docker): add Docker support and GitHub Actions workflow for Doc… #1

build(docker): add Docker support and GitHub Actions workflow for Doc…

build(docker): add Docker support and GitHub Actions workflow for Doc… #1

Workflow file for this run

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 }}