Skip to content

Commit

Permalink
feat: push to docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
esaminu committed Mar 27, 2024
1 parent 76a5767 commit fe16b7e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/push-to-docker-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Push to Docker Hub GitHub Action

on: [workflow_call, pull_request]

permissions:
id-token: write
contents: read

jobs:
build-and-push-to-artifact-registry:
defaults:
run:
working-directory: ./packages/near-fast-auth-signer
runs-on: ubuntu-latest
environment: mainnet
steps:
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get tag
id: get-tag
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}

- id: docker-push-tagged
name: Tag Docker image and push to Google Artifact Registry
uses: docker/build-push-action@v5
with:
push: true
tags: |
fast-auth-sdk-frontend:${{ steps.get-tag.outputs.short_ref }}
fast-auth-sdk-frontend:latest

0 comments on commit fe16b7e

Please sign in to comment.