mirror of
https://github.com/NexVeridian/ark-invest-api-rust.git
synced 2025-09-02 09:59:11 +00:00
fix: docker push
This commit is contained in:
parent
c2267a4bea
commit
486ed4c958
4 changed files with 24 additions and 18 deletions
27
.github/workflows/docker.yml
vendored
27
.github/workflows/docker.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Docker
|
||||
name: docker
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
|
@ -73,17 +73,16 @@ jobs:
|
|||
# https://github.com/orgs/community/discussions/25768#discussioncomment-3249183
|
||||
- name: Downcase REPO
|
||||
run: |
|
||||
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
|
||||
echo "REPO=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
|
||||
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./result
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Strip REPO Username
|
||||
run: |
|
||||
STRIP_REPO_USERNAME=$(echo "${{ env.REPO }}" | sed 's/nexveridian\///')
|
||||
echo "STRIP_REPO_USERNAME=${STRIP_REPO_USERNAME}" >> ${GITHUB_ENV}
|
||||
|
||||
# https://github.com/docker/build-push-action/issues/538
|
||||
- name: Push and tag Docker image
|
||||
run: |
|
||||
docker load < result
|
||||
docker tag ${{ env.STRIP_REPO_USERNAME }}:latest ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REPO }}:latest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue