This commit is contained in:
parent
87a78e5cfd
commit
a2afa8afd8
37
.gitea/workflows/publish-docker.yaml
Normal file
37
.gitea/workflows/publish-docker.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: git.aykhans.me
|
||||
username: ${{ secrets.ACCOUNT_USERNAME }}
|
||||
password: ${{ secrets.ACCOUNT_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.aykhans.me/${{ github.repository }}:latest
|
||||
|
||||
- name: Create Package
|
||||
env:
|
||||
ACCOUNT_TOKEN: ${{ secrets.ACCOUNT_TOKEN }}
|
||||
run: |
|
||||
curl -X POST "https://git.aykhans.me/api/v1/packages/${{ github.repository_owner }}/docker/${{ github.repository_name }}/blobs/upload" \
|
||||
-H "Authorization: token $ACCOUNT_TOKEN" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary "@Dockerfile"
|
Loading…
x
Reference in New Issue
Block a user