forked from software-mansion-labs/GoL2
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate CI/CD workflow from DigitalOcean to Google Actions
This commit switches the
- Loading branch information
1 parent
e44fa92
commit 93fc921
Showing
2 changed files
with
38 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,50 @@ | ||
name: ci | ||
name: gol2 | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
Build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.meta.outputs.version }} | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: europe-west9-docker.pkg.dev/gol2-development/gol2-indexer/dev | ||
flavor: latest=false | ||
tags: | | ||
type=ref,suffix=-{{sha}},event=branch | ||
type=ref,suffix=-{{sha}},event=pr | ||
- uses: 'google-github-actions/auth@v2' | ||
id: auth | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v3 | ||
token_format: access_token | ||
project_id: 'gol2-development' | ||
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | ||
|
||
- name: Login to GAR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: europe-west9-docker.pkg.dev | ||
username: oauth2accesstoken | ||
password: ${{ steps.auth.outputs.access_token }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: Dockerfile | ||
push: true | ||
tags: yukilabs/gol2-indexer:latest | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
secrets: | | ||
"certificate=${{ secrets.CERTIFICATE }}" |
This file was deleted.
Oops, something went wrong.