Skip to content

Commit

Permalink
Migrate CI/CD workflow from DigitalOcean to Google Actions
Browse files Browse the repository at this point in the history
This commit switches the
  • Loading branch information
CreatedByBdr committed Feb 6, 2024
1 parent e44fa92 commit 93fc921
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 67 deletions.
55 changes: 38 additions & 17 deletions .github/workflows/ci.yml
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 }}"
50 changes: 0 additions & 50 deletions .github/workflows/migration.yml

This file was deleted.

0 comments on commit 93fc921

Please sign in to comment.