-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce0ad65
commit ea07656
Showing
1 changed file
with
52 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build and Push rair-front Docker Image to Docker Hub | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
#Allow repo secrets | ||
env: | ||
VITE_ALCHEMY_KEY: ${{ secrets.VITE_ALCHEMY_KEY }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 'dev' | ||
|
||
- name: login to docker registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{secrets.DOCKERHUB_USERNAME}} | ||
password: ${{secrets.DOCKERHUB_TOKEN}} | ||
|
||
- name: build and push rair-front docker image to registry | ||
run: cp rair-front/.env.sample rair-front/.env | ||
- name: appending VITE_MATIC_MAINNET_ALCHEMY_KEY in .env file | ||
run: echo "VITE_MATIC_MAINNET_ALCHEMY_KEY"=${{ secrets.VITE_MATIC_MAINNET_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_MATIC_MAINNET_GAS_POLICY in .env file | ||
run: echo "VITE_MATIC_MAINNET_GAS_POLICY"=${{ secrets.VITE_MATIC_MAINNET_GAS_POLICY }} >> rair-front/.env | ||
- name: appending VITE_ETH_MAINNET_ALCHEMY_KEY in .env file | ||
run: echo "VITE_ETH_MAINNET_ALCHEMY_KEY"=${{ secrets.VITE_ETH_MAINNET_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_ETH_MAINNET_GAS_POLICY in .env file | ||
run: echo "VITE_ETH_MAINNET_GAS_POLICY"=${{ secrets.VITE_ETH_MAINNET_GAS_POLICY }} >> rair-front/.env | ||
- name: appending VITE_BASE_MAINNET_ALCHEMY_KEY in .env file | ||
run: echo "VITE_BASE_MAINNET_ALCHEMY_KEY"=${{ secrets.VITE_BASE_MAINNET_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_BASE_MAINNET_GAS_POLICY in .env file | ||
run: echo "VITE_BASE_MAINNET_GAS_POLICY"=${{ secrets.VITE_BASE_MAINNET_GAS_POLICY }} >> rair-front/.env | ||
- name: appending VITE_ETH_SEPOLIA_ALCHEMY_KEY in .env file | ||
run: echo "VITE_ETH_SEPOLIA_ALCHEMY_KEY"=${{ secrets.VITE_ETH_SEPOLIA_ALCHEMY_KEY }} >> rair-front/.env | ||
- name: appending VITE_ETH_SEPOLIA_GAS_POLICY in .env file | ||
run: echo "VITE_ETH_SEPOLIA_GAS_POLICY"=${{ secrets.VITE_ETH_SEPOLIA_GAS_POLICY }} >> rair-front/.env | ||
- name: build rair-front docker image | ||
run: sudo docker build -t rair-front:${{github.sha}} -f rair-front/Dockerfile.prod rair-front | ||
- name: tag image | ||
run: | | ||
docker tag rair-front:${{github.sha}} ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_${{github.sha}} | ||
docker tag rair-front:${{github.sha}} ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_latest | ||
- name: Docker push | ||
run: | | ||
docker push ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_${{github.sha}} | ||
docker push ${{secrets.DOCKERHUB_USERNAME}}/rair-front:_latest |