Skip to content

Commit

Permalink
ci: push to docekr hub
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao authored Oct 24, 2024
1 parent c72386b commit 8f8ce32
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-and-push-bskyweb-hub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build-and-push-bskyweb-hub
on:
workflow_dispatch: ~
push:
branches:
- mod
env:
IMAGE_NAME: ${{ secrets.DOCKER_REPO }}

jobs:
bskyweb-container-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v1

- name: Log into hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=bskyweb:,suffix=,format=long
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8f8ce32

Please sign in to comment.