This commit is contained in:
parent
271e8b9c0d
commit
94838aa75a
@ -8,23 +8,22 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker:cli
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ gitea.server_url }} -u ${{ gitea.actor }} --password-stdin
|
||||||
registry: ${{ gitea.server_url }}
|
|
||||||
username: ${{ gitea.actor }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build Docker image
|
||||||
uses: docker/build-push-action@v5
|
run: |
|
||||||
with:
|
docker build -t ${{ gitea.server_url }}/${{ gitea.repository }}:latest .
|
||||||
context: .
|
docker tag ${{ gitea.server_url }}/${{ gitea.repository }}:latest ${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.sha }}
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ gitea.server_url }}/${{ gitea.repository }}:latest
|
|
||||||
${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.sha }}
|
|
||||||
|
|
||||||
|
- name: Push Docker image
|
||||||
|
run: |
|
||||||
|
docker push ${{ gitea.server_url }}/${{ gitea.repository }}:latest
|
||||||
|
docker push ${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.sha }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user