Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-build-push: Version Bump and Push Failure Fix #10

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/actions/docker-build-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,38 +44,39 @@ runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Buildx is currently required to use a subdirectory w/ build-push-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3.4.0

- name: Log in to container registry
uses: docker/login-action@v2
uses: docker/login-action@v3.2.0
with:
registry: ${{ inputs.container-registry }}
username: ${{ github.repository_owner }}
password: ${{ github.token }}
logout: false

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5.5.1
with:
images: ${{ inputs.container-registry }}/${{ inputs.image-name }}
flavor: |
latest=true

- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6.3.0
with:
context: "{{defaultContext}}:${{ inputs.dockerfile-directory }}"
build-args: ${{ inputs.build-args }}
secrets: ${{ inputs.build-secrets }}
file: ${{ inputs.dockerfile-name }}
push: ${{ inputs.push }}
target: ${{ inputs.target }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ inputs.image-name }}:latest
labels: ${{ steps.meta.ouputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down