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

build and push manually #5

Merged
merged 7 commits into from
Mar 28, 2023
Merged
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
27 changes: 15 additions & 12 deletions .github/workflows/astria-build-and-publish-image.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
build-and-publish-latest:
name: Build and Publish Docker image
on:
workflow_dispatch:
push:
branches:
- astria # Running this job only for astria branch
jobs:
build-and-publish-latest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2 # Checking out the repo
- uses: actions/setup-go@v4
with:
go-version: "^1.20.x" # The Go version to download (if necessary) and use.
go-version: "^1.20.x" # The Go version to download (if necessary) and use.
- run: go version

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

# TODO - build for amd64 and arm64?
- name: Build and Publish latest Docker image
uses: TCPShield/gp-docker-action@1.1.13
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages
image-name: ghcr.io/astriaorg/go-ethereum # Provide only Docker image name, tag will be automatically set to latest
# Pass some additional arguments to the docker build command
# FIXME - version needs to be autoincrement, probably from git tags?
custom-args: --build-arg COMMIT=${GITHUB_SHA} --build-arg VERSION=0.1.0 --build-arg BUILDNUM=${GITHUB_RUN_NUMBER}
# FIXME - version needs to be autoincrement, probably from git tags?
- name: Build latest Docker image
run: docker build \
--build-arg COMMIT=${GITHUB_SHA} \
--build-arg VERSION=0.1 \
--build-arg BUILDNUM=${GITHUB_RUN_NUMBER} \
--tag ghcr.io/astriaorg/go-ethereum:latest .
- name: Push latest Docker image
run: docker push ghcr.io/astriaorg/go-ethereum:latest