Skip to content

Commit

Permalink
feat(ci): Switch to ghcr.io for build
Browse files Browse the repository at this point in the history
  • Loading branch information
aurora-svc committed Feb 26, 2025
1 parent 182bc59 commit 9e2d81e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 165 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build-push-container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build Push Containers

on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'main'

jobs:
build-push-container:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
labels: |
org.opencontainers.image.vendor="GC Cloud One: Aurora"
org.opencontainers.image.licenses="https://github.com/${{ github.repository }}/blob/main/LICENSE.md"
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Output Image Digest
run: echo "Image pushed with digest ${{ steps.docker_build.outputs.digest }}"
36 changes: 0 additions & 36 deletions .github/workflows/build.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/publish_main.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/publish_tag.yml

This file was deleted.

0 comments on commit 9e2d81e

Please sign in to comment.