Skip to content

Commit

Permalink
combined arm and amd build step
Browse files Browse the repository at this point in the history
  • Loading branch information
spenceradolph committed Apr 15, 2024
1 parent b27bd99 commit 18adb4d
Showing 1 changed file with 55 additions and 55 deletions.
110 changes: 55 additions & 55 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
org.opencontainers.image.source=${{ env.IMAGE_SOURCE }}
org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }}
org.opencontainers.image.licenses=${{ env.IMAGE_LICENSE }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64

- name: Build and push the server container image (implant)
uses: docker/build-push-action@v5 # ref: https://github.com/marketplace/actions/build-and-push-docker-images
Expand All @@ -88,7 +88,7 @@ jobs:
org.opencontainers.image.source=${{ env.IMAGE_SOURCE }}
org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }}
org.opencontainers.image.licenses=${{ env.IMAGE_LICENSE }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64

update_files:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -143,56 +143,56 @@ jobs:
# Have the workflow fail in case there are pathspec issues
pathspec_error_handling: exitImmediately

agent_build_arm:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout the repository
uses: actions/checkout@v4 # ref: https://github.com/marketplace/actions/checkout
- name: Log in to the container registry
uses: docker/login-action@v3 # ref: https://github.com/marketplace/actions/docker-login
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64,arm'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Build and push the server container image (api)
uses: docker/build-push-action@v5 # ref: https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: Payload_Type/sliverapi
file: Payload_Type/sliverapi/Dockerfile
tags: |
${{ env.REGISTRY }}/mythicagents/sliver:sliverapi.${{ env.VERSION }}
push: ${{ github.ref_type == 'tag' }}
# These container metadata labels allow configuring the package in Github
# packages. The source will link the package to this Github repository
labels: |
org.opencontainers.image.source=${{ env.IMAGE_SOURCE }}
org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }}
org.opencontainers.image.licenses=${{ env.IMAGE_LICENSE }}
platforms: linux/arm64

- name: Build and push the server container image (implant)
uses: docker/build-push-action@v5 # ref: https://github.com/marketplace/actions/build-and-push-docker-images
with:
context: Payload_Type/sliverimplant
file: Payload_Type/sliverimplant/Dockerfile
tags: |
${{ env.REGISTRY }}/mythicagents/sliver:sliverimplant.${{ env.VERSION }}
push: ${{ github.ref_type == 'tag' }}
# These container metadata labels allow configuring the package in Github
# packages. The source will link the package to this Github repository
labels: |
org.opencontainers.image.source=${{ env.IMAGE_SOURCE }}
org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }}
org.opencontainers.image.licenses=${{ env.IMAGE_LICENSE }}
platforms: linux/arm64
# agent_build_arm:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# packages: write
# steps:
# - name: Checkout the repository
# uses: actions/checkout@v4 # ref: https://github.com/marketplace/actions/checkout
# - name: Log in to the container registry
# uses: docker/login-action@v3 # ref: https://github.com/marketplace/actions/docker-login
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# with:
# platforms: 'arm64,arm'
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v2

# - name: Build and push the server container image (api)
# uses: docker/build-push-action@v5 # ref: https://github.com/marketplace/actions/build-and-push-docker-images
# with:
# context: Payload_Type/sliverapi
# file: Payload_Type/sliverapi/Dockerfile
# tags: |
# ${{ env.REGISTRY }}/mythicagents/sliver:sliverapi.${{ env.VERSION }}
# push: ${{ github.ref_type == 'tag' }}
# # These container metadata labels allow configuring the package in Github
# # packages. The source will link the package to this Github repository
# labels: |
# org.opencontainers.image.source=${{ env.IMAGE_SOURCE }}
# org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }}
# org.opencontainers.image.licenses=${{ env.IMAGE_LICENSE }}
# platforms: linux/arm64

# - name: Build and push the server container image (implant)
# uses: docker/build-push-action@v5 # ref: https://github.com/marketplace/actions/build-and-push-docker-images
# with:
# context: Payload_Type/sliverimplant
# file: Payload_Type/sliverimplant/Dockerfile
# tags: |
# ${{ env.REGISTRY }}/mythicagents/sliver:sliverimplant.${{ env.VERSION }}
# push: ${{ github.ref_type == 'tag' }}
# # These container metadata labels allow configuring the package in Github
# # packages. The source will link the package to this Github repository
# labels: |
# org.opencontainers.image.source=${{ env.IMAGE_SOURCE }}
# org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }}
# org.opencontainers.image.licenses=${{ env.IMAGE_LICENSE }}
# platforms: linux/arm64

0 comments on commit 18adb4d

Please sign in to comment.