Skip to content

Commit

Permalink
test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx committed May 6, 2024
1 parent d2bbfb3 commit db7944b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: 'Deploy'

on:
pull_request:
push:
branches: ['workshop/*']

jobs:
set_name:
name: 'Get name from branch name and set env'
set-name:
name: 'Get name from branch name and set output'
id: set-name
outputs:
my_name: ${{ steps.set-name.outputs.my_name }}
runs-on: ubuntu-latest
steps:
- run: echo "MY_NAME=${BRANCH##*/}" >> "$GITHUB_ENV"
- run: echo "my_name=${BRANCH##*/}" >> "$GITHUB_OUTPUT"
env:
BRANCH: ${{ github.ref_name }}

run_tests:
run-tests:
name: 'Run frontend tests'
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -60,7 +63,7 @@ jobs:
uses: docker/build-push-action@v5
with:
push: 'true'
tags: 'ghcr.io/${{ github.repository }}/${{ env.MY_NAME }}:latest'
tags: 'ghcr.io/${{ github.repository }}/${{ needs.set-name.outputs.my_name }}:latest'
file: 'frontend/Dockerfile'

deploy:
Expand All @@ -69,7 +72,7 @@ jobs:
needs: [build]
env:
TF_VAR_revision_suffix: ${{ github.sha }}
TF_VAR_my_name: ${{ env.MY_NAME }}
TF_VAR_my_name: ${{ needs.set-name.outputs.my_name }}
ARM_CLIENT_ID: ${{ vars.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ vars.ARM_SUBSCRIPTION_ID }}
Expand Down
Empty file added hei.txt
Empty file.
1 change: 1 addition & 0 deletions test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
heihei

0 comments on commit db7944b

Please sign in to comment.