Skip to content

Commit

Permalink
ci: attempt to build docker image in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Nov 16, 2023
1 parent 406603d commit a6e3f5b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: docker
on:
push:
branches:
- main

env:
GO_VERSION: '1.21.3'

jobs:
docker-build:
name: docker-build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Login to Scaleway container registry
run: docker login rg.fr-par.scw.cloud/supply -u nologin -p ${{ secrets.SCALEWAY_API_SECRET_KEY }}
# - name: Log in to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Run make docker-build
run: make docker-build
- name: Run make docker-tag
run: make docker-tag
- name: Run make docker-push
run: make docker-push
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ build:
docker-build:
@echo "--> Building the docker image"
@docker build . --tag "celestiaorg/supply:latest"

## docker-tag: Tags the docker image so that it can be pushed to Scaleway.
docker-tag:
@echo "--> Tagging the docker image so that it can be pushed to Scaleway"
@docker tag celestiaorg/supply rg.fr-par.scw.cloud/supply/supply:latest

## docker-push: Pushes the docker image to Scaleway.
docker-push:
@echo "--> Pushing the docker image"
@docker push rg.fr-par.scw.cloud/supply/supply:latest

0 comments on commit a6e3f5b

Please sign in to comment.