This commit is contained in:
1 parent
854da073d4
commit
3c294ffc17
1 file changed
+21
-8
@@ -15,13 +15,26 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out source
|
- name: Check out source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Log in to Gitea container registry
|
- name: Log in to Gitea container registry
|
||||||
env:
|
uses: docker/login-action@v3
|
||||||
REGISTRY_USERNAME: ${{ secrets.PACKAGE_REGISTRY_USERNAME }}
|
with:
|
||||||
REGISTRY_PASSWORD: ${{ secrets.PACKAGE_REGISTRY_PASSWORD }}
|
registry: ${{ env.REGISTRY }}
|
||||||
run: echo "$REGISTRY_PASSWORD" | docker login "$REGISTRY" --username "$REGISTRY_USERNAME" --password-stdin
|
username: ${{ secrets.PACKAGE_REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.PACKAGE_REGISTRY_PASSWORD }}
|
||||||
|
- name: Extract image metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.IMAGE }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=sha,format=long
|
||||||
- name: Build and publish image
|
- name: Build and publish image
|
||||||
run: |
|
uses: docker/build-push-action@v6
|
||||||
docker build --tag "$IMAGE:$GITEA_SHA" --tag "$IMAGE:latest" .
|
with:
|
||||||
docker push "$IMAGE:$GITEA_SHA"
|
context: .
|
||||||
docker push "$IMAGE:latest"
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
Reference in new issue
Block a user