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 and Push Docker Image to GHCR | |
on: | |
push: | |
branches: | |
- main # Triggers the workflow when pushing to the `main` branch | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the repository code | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Build the Docker image | |
- name: Build Docker image | |
run: | | |
docker login --username potajito --password ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
docker build -t ghcr.io/potajito/steamloggd:latest . | |
docker push ghcr.io/potajito/steamloggd:latest |