Skip to content

Commit

Permalink
Use depot for builds (#19)
Browse files Browse the repository at this point in the history
* Switch to depot builds

* Re-add accidentally removed img

* Fix path to dockerfile
  • Loading branch information
aajimal authored Jun 6, 2024
1 parent 17d4557 commit 34fd430
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 32 deletions.
Binary file added .github/resources/goomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id-token: write
packages: write
with:
# depot-project-id: mhgvgvsjnx
depot-project-id: c3gpflm133
package-name: spamooor
target-binary: astria-spamooor
tag: ${{ inputs.tag }}
Expand Down
59 changes: 28 additions & 31 deletions .github/workflows/reusable-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Reusable Docker Build && Push Workflow
on:
workflow_call:
inputs:
# depot-project-id:
# required: true
# type: string
depot-project-id:
required: true
type: string
package-name:
required: true
type: string
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
# - uses: depot/setup-action@v1
- uses: depot/setup-action@v1
- name: Login to Docker Hub
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'astriaorg/spamooor'
uses: docker/login-action@v2
Expand All @@ -50,11 +50,11 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v2
# Generate correct tabs and labels
- name: Docker metadata
id: metadata
Expand All @@ -67,8 +67,22 @@ jobs:
type=sha
# set latest tag for `main` branch
type=raw,value=latest,enable=${{ env.FULL_REF == format('refs/heads/{0}', 'main') }}
- name: Build and push
uses: docker/build-push-action@v4
# - name: Build and push
# uses: docker/build-push-action@v4
# with:
# # this gets rid of the unknown/unknown image that is created without this setting
# # https://github.com/docker/build-push-action/issues/820#issuecomment-1455687416
# provenance: false
# context: .
# file: Dockerfile
# build-args: |
# TARGETBINARY=${{ inputs.target-binary }}
# platforms: 'linux/amd64,linux/arm64'
# push: ${{ github.repository_owner == 'astriaorg'}}
# tags: ${{ steps.metadata.outputs.tags }}
# labels: ${{ steps.metadata.outputs.labels }}
- name: Build and push (Depot)
uses: depot/build-push-action@v1
with:
# this gets rid of the unknown/unknown image that is created without this setting
# https://github.com/docker/build-push-action/issues/820#issuecomment-1455687416
Expand All @@ -77,25 +91,8 @@ jobs:
file: Dockerfile
build-args: |
TARGETBINARY=${{ inputs.target-binary }}
platforms: 'linux/amd64,linux/arm64'
push: ${{ github.repository_owner == 'astriaorg'}}
platforms: "linux/amd64,linux/arm64"
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'astriaorg/spamooor' }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
# - name: Build and push (Depot)
# uses: depot/build-push-action@v1
# with:
# # this gets rid of the unknown/unknown image that is created without this setting
# # https://github.com/docker/build-push-action/issues/820#issuecomment-1455687416
# provenance: false
# context: .
# file: containerfiles/Dockerfile
# build-args: |
# TARGETBINARY=${{ inputs.target-binary }}
# platforms: "linux/amd64,linux/arm64"
# push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'astriaorg/spamooor' }}
# tags: ${{ steps.metadata.outputs.tags }}
# labels: ${{ steps.metadata.outputs.labels }}
# project: ${{ inputs.depot-project-id }}



project: ${{ inputs.depot-project-id }}
1 change: 1 addition & 0 deletions depot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"c3gpflm133"}

0 comments on commit 34fd430

Please sign in to comment.