Skip to content

Commit

Permalink
migrated from gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Aug 9, 2024
1 parent 4b0b257 commit b562dc6
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 8 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: Docker

on:
push:
branches: [ "main" ]
tags: [ '*' ]
workflow_dispatch:

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write


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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata for tag
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
with:
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
8 changes: 0 additions & 8 deletions .gitlab-ci.yml

This file was deleted.

0 comments on commit b562dc6

Please sign in to comment.