Skip to content

Commit

Permalink
alternative way ti push images
Browse files Browse the repository at this point in the history
  • Loading branch information
jasminabrar committed Dec 15, 2023
1 parent 672b20d commit 4faa481
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/Docker_Image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,29 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image as latest image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}-latest
labels: ${{ steps.meta.outputs.labels }}
run: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 --push --tags latest --labels ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image as unique image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: "${{ steps.meta.outputs.tags }}.${{ steps.get-version.EBEAM_PDK }}.${{ steps.get-version.TOOLS }}"
labels: ${{ steps.meta.outputs.labels }}
run: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 --push --tags "${{ github.ref_slug }}${EBEAM_PDK}.${TOOLS}" --labels ${{ steps.meta.outputs.labels }}
# - name: Build and push Docker image as latest image
# uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
# with:
# context: .
# push: true
# tags: ${{ steps.meta.outputs.tags }}-latest
# labels: ${{ steps.meta.outputs.labels }}

# - name: Build and push Docker image as unique image
# uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
# with:
# context: .
# push: true
# tags: "${{ steps.meta.outputs.tags }}.${{ env.EBEAM_PDK }}.${{ env.TOOLS }}"
# labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 4faa481

Please sign in to comment.