migrate from imgix (#25) #16
Workflow file for this run
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
name: Build and Update Image Tag | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
release: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build and Push | |
run: | | |
npm run build | |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ vars.DOCKER_USERNAME }} --password-stdin | |
docker build -t jaskaransarkaria/enki-website:${{ github.ref_name }} . | |
docker push jaskaransarkaria/enki-website:${{ github.ref_name }} | |
env: | |
PUBLIC_SERVER_URL: https://server.enkionline.com | |
PUBLIC_STRIPE_KEY: pk_live_51HpvnTAk37gvJ51oKXsYuAZsyletQkgqOky7L2yV9c9nDMj1koLPMvsC6sKBOCqveZMk8CHy730HDFSkiFsbzSRB0059ZpWGau | |
- name: Upadate Image Tag | |
run: | | |
sed -ie "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/${{ github.ref_name }}/" .kubernetes/deployment.yaml | |
sed -ie "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/${{ github.ref_name }}/" .kubernetes/e2e-test-deployment.yaml | |
git add .kubernetes/deployment.yaml | |
git add .kubernetes/e2e-test-deployment.yaml | |
- name: Commit & Push changes | |
uses: actions-js/push@v1.4 | |
with: | |
github_token: ${{ secrets.GH_ACCESS_TOKEN }} | |
message: "🦾 deploying: bumping image version for release ${{ github.ref_name }}" |