Merge pull request #6 from mi3lix9/mi3lix9-patch-1 #3
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 to GHCR | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_push: | |
permissions: | |
packages: write | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build and Push the Image to GHCR | |
run: | | |
docker login ghcr.io -u ${{ github.actor }} \ | |
-p ${{ secrets.GITHUB_TOKEN }} | |
docker build -t ghcr.io/${{ github.repository }}:develop . | |
docker push ghcr.io/${{ github.repository }}:develop | |
# name: Build and Push Docker Image | |
# on: | |
# push: | |
# branches: | |
# - main | |
# jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# permissions: | |
# packages: write | |
# contents: read | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# - 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.GITHUB_TOKEN }} | |
# - name: Build and push Docker image | |
# uses: docker/build-push-action@v4 | |
# with: | |
# context: . | |
# push: true | |
# tags: ghcr.io/${{ github.repository }}:latest |