Update .gitea/workflows/build-push-docker.yml
This commit is contained in:
parent
a5ef87e908
commit
78d01c4b25
@ -11,6 +11,15 @@ on:
|
|||||||
release:
|
release:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
registry:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
actions_username:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
ghcr_username:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
@ -24,8 +33,8 @@ jobs:
|
|||||||
mkdir -p /etc/docker
|
mkdir -p /etc/docker
|
||||||
touch -a /etc/default/docker
|
touch -a /etc/default/docker
|
||||||
touch -a /etc/docker/daemon.json
|
touch -a /etc/docker/daemon.json
|
||||||
echo "DOCKER_OPTS=\"--insecure-registry ${{ vars.PACKAGES_REGISTRY_URL }}\"" >> /etc/default/docker
|
echo "DOCKER_OPTS=\"--insecure-registry ${{ inputs.registry }}\"" >> /etc/default/docker
|
||||||
echo "{\"insecure-registries\": [\"${{ vars.PACKAGES_REGISTRY_URL }}\"]}" > /etc/docker/daemon.json
|
echo "{\"insecure-registries\": [\"${{ inputs.registry }}\"]}" > /etc/docker/daemon.json
|
||||||
|
|
||||||
- name: Get repo name
|
- name: Get repo name
|
||||||
id: split
|
id: split
|
||||||
@ -45,15 +54,15 @@ jobs:
|
|||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ vars.PACKAGES_REGISTRY_URL }}
|
registry: ${{ inputs.registry }}
|
||||||
username: ${{ vars.ACTIONS_USERNAME }}
|
username: ${{ inputs.actions_username }}
|
||||||
password: ${{ secrets.ACTIONS_TOKEN }}
|
password: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ vars.GHCR_USERNAME }}
|
username: ${{ inputs.ghcr_username }}
|
||||||
password: ${{ secrets.GHCR_TOKEN }}
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
@ -62,8 +71,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tags: type=semver,pattern=v{{version}},value=${{ inputs.release }}
|
tags: type=semver,pattern=v{{version}},value=${{ inputs.release }}
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ vars.GHCR_USERNAME }}/${{ steps.split.outputs.repo }}
|
ghcr.io/${{ inputs.ghcr_username }}/${{ steps.split.outputs.repo }}
|
||||||
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}
|
${{ inputs.registry }}/${{ gitea.repository }}
|
||||||
|
|
||||||
- name: Print metadata
|
- name: Print metadata
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user