Skip to content

Commit

Permalink
refactor: Using direct docker commands for workflow to publish on GH …
Browse files Browse the repository at this point in the history
…packages
  • Loading branch information
Vicente Herrera committed Nov 2, 2020
1 parent fef6a52 commit 00b6525
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build-forwarder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
file: AKSKubeAuditReceiverSolution/AKSKubeAuditReceiver/Dockerfile
platforms: linux/amd64
push: true
load: true
tags: |
sysdiglabs/aks-audit-log-forwarder:latest
sysdiglabs/aks-audit-log-forwarder:${{ steps.prepare_version_labels.outputs.VERSION_MAJOR }}
Expand All @@ -161,13 +162,16 @@ jobs:
registry: docker.pkg.github.com
username: ${{ secrets.CR_PAT_PKG_USER }}
password: ${{ secrets.CR_PAT_PKG }}
- name: Build and push GitHub Packages
if: github.event_name == 'release'
uses: docker/build-push-action@v2
with:
context: AKSKubeAuditReceiverSolution/
file: AKSKubeAuditReceiverSolution/AKSKubeAuditReceiver/Dockerfile
platforms: linux/amd64
push: true
tags: |
docker.pkg.github.com/sysdiglabs/aks-audit-log/aks-audit-log-forwarder:${{ steps.prepare_version_labels.outputs.VERSION_FULL }}
- name: Build and Push to GitHub Packages
run: |
docker build ${CONTEXT_PATH} -f ${DOCKERFILE_PATH} \
-t docker.pkg.github.com/${GH_REPO}/${IMAGE_NAME}:${VERSION_FULL}
docker push \
docker.pkg.github.com/${GH_REPO}/${IMAGE_NAME}:${VERSION_FULL}
env:
IMAGE_NAME: aks-audit-log-forwarder
CONTEXT_PATH: AKSKubeAuditReceiverSolution/
DOCKERFILE_PATH: AKSKubeAuditReceiverSolution/AKSKubeAuditReceiver/Dockerfile
VERSION_FULL: ${{ steps.prepare_version_labels.outputs.VERSION_FULL }}
GH_REPO: sysdiglabs/aks-audit-log

29 changes: 15 additions & 14 deletions .github/workflows/build-installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -157,6 +153,7 @@ jobs:
file: ./build/Dockerfile
platforms: linux/amd64
push: true
load: true
tags: |
sysdiglabs/aks-audit-log-installer:latest
sysdiglabs/aks-audit-log-installer:${{ steps.prepare_version_labels.outputs.VERSION_MAJOR }}
Expand All @@ -168,13 +165,17 @@ jobs:
registry: docker.pkg.github.com
username: ${{ secrets.CR_PAT_PKG_USER }}
password: ${{ secrets.CR_PAT_PKG }}
- name: Build and push GitHub Packages
if: github.event_name == 'release'
uses: docker/build-push-action@v2
with:
context: .
file: ./build/Dockerfile
platforms: linux/amd64
push: true
tags: |
docker.pkg.github.com/sysdiglabs/aks-audit-log/aks-audit-log-installer:${{ steps.prepare_version_labels.outputs.VERSION_FULL }}
- name: Build and Push to GitHub Packages
run: |
docker build ${CONTEXT_PATH} -f ${DOCKERFILE_PATH} \
-t docker.pkg.github.com/${GH_REPO}/${IMAGE_NAME}:${VERSION_FULL}
docker push \
docker.pkg.github.com/${GH_REPO}/${IMAGE_NAME}:${VERSION_FULL}
env:
IMAGE_NAME: aks-audit-log-installer
CONTEXT_PATH: ./
DOCKERFILE_PATH: build/Dockerfile
VERSION_FULL: ${{ steps.prepare_version_labels.outputs.VERSION_FULL }}
GH_REPO: sysdiglabs/aks-audit-log


0 comments on commit 00b6525

Please sign in to comment.