Fix image-build: single-step docker install+push
This commit is contained in:
parent
cc12a1270f
commit
b25a6f042f
1 changed files with 7 additions and 12 deletions
|
|
@ -19,22 +19,17 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install docker CLI (static binary)
|
||||
- name: Build and push image
|
||||
env:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
set -eu
|
||||
mkdir -p "${HOME}/bin"
|
||||
wget -qO- https://download.docker.com/linux/static/stable/x86_64/docker-27.3.1.tgz | tar xz --strip-components=1 -C "${HOME}/bin" docker/docker
|
||||
echo "${HOME}/bin" >> "${GITHUB_PATH}"
|
||||
"${HOME}/bin/docker" version
|
||||
|
||||
- name: Login to Forgejo registry
|
||||
run: |
|
||||
set -eu
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${REGISTRY}" -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||
|
||||
- name: Build and push
|
||||
run: |
|
||||
set -eu
|
||||
export PATH="${HOME}/bin:${PATH}"
|
||||
docker version
|
||||
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${REGISTRY_USER}" --password-stdin
|
||||
TAG="${GITHUB_SHA:-manual}"
|
||||
SHORT="${TAG:0:7}"
|
||||
IMAGE="${REGISTRY}/${IMAGE_NAME}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue