Some checks failed
Publish to Package Regsitry / deploy (push) Failing after 2m20s
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Publish to Package Regsitry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
REGISTRY_URL: gitea.jono-rams.work
|
|
REGISTRY_TOKEN: ${{ secrets.GLOBAL_PACKAGE_TOKEN }}
|
|
REGISTRY_USER: ${{ vars.GLOBAL_ACCOUNT_EMAIL }}
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Package Regsitry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY_URL }}
|
|
username: ${{ env.REGISTRY_USER }}
|
|
password: ${{ env.REGISTRY_TOKEN }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and Push Docker Image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY_URL }}/${{ gitea.repository_owner }}/${{ gitea.repository_name }}:latest
|
|
${{ env.REGISTRY_URL }}/${{ gitea.repository_owner }}/${{ gitea.repository_name }}:${{ gitea.sha }}
|
|
|
|
- name: Logout from Gitea Package Regsitry
|
|
if: always()
|
|
run: docker logout ${env.REGISTRY_URL}
|
|
|