Skip to content

Commit

Permalink
fix(ci): github action of docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeffcaii committed Jul 23, 2024
1 parent 9f44603 commit 7af5fa6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 96 deletions.
96 changes: 0 additions & 96 deletions .github/workflows/docker-publish.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Docker

on:
push:
branches: [ "master" ]
# Publish semver tags as releases.
tags: [ '*' ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- 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@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}:${{ steps.meta.outputs.tags }}

- name: Log out from GitHub Container Registry
run: docker logout ghcr.io

0 comments on commit 7af5fa6

Please sign in to comment.