Skip to content

Commit

Permalink
ci: update deployment triggers to include tag pushes
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 committed Dec 30, 2024
1 parent a1905c3 commit fe2178e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Build and push Docker image for docs
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['main']
tags:
- '*'
paths:
- 'docs/**'

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/deploy-webapp.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Create and publish a Docker image

# Configures this workflow to run every time a change is pushed to the branch called `release`.
# Configures this workflow to run on push to the develop branch and on tag creation.
on:
push:
branches: ['main', 'develop']
branches: ['develop']
tags:
- '*'

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand All @@ -20,7 +22,6 @@ jobs:
contents: read
attestations: write
packages: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -41,12 +42,13 @@ jobs:
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
id: push
uses: docker/[email protected]
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: |
${{ steps.meta.outputs.tags }}
${{ !startsWith(github.ref, 'refs/tags/') && 'develop' || 'release' }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
EXPO_PUBLIC_THI_API_KEY=${{ secrets.EXPO_PUBLIC_THI_API_KEY }}
Expand Down

0 comments on commit fe2178e

Please sign in to comment.