ci: test bump version #35
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: Docker Build | |
on: | |
push: | |
# branches: | |
# - main | |
jobs: | |
upgrade-project-version: | |
if: ${{ !contains(github.event.head_commit.message, '[RELEASE]') }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: apps/web/ | |
steps: | |
- | |
name: checkout | |
uses: actions/checkout@v3 | |
- | |
name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- | |
name: Upgrade project version | |
id: upgrade-version-step | |
run: | | |
npm version patch && | |
NEW_VERSION=$(cat package.json | jq -r '.version') | |
echo "Version clean is $NEW_VERSION" | |
echo API_VERSION=$NEW_VERSION >> $GITHUB_OUTPUT | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git add . | |
git commit -m "[RELEASE] $NEW_VERSION" | |
git push | |
outputs: | |
API_VERSION: ${{ steps.upgrade-version-step.outputs.API_VERSION }} | |
docker-build: | |
needs: [upgrade-project-version] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: 'Automated Version Bump' | |
id: version-bump | |
uses: 'phips28/gh-action-bump-version@master' | |
with: | |
tag-prefix: 'v' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PACKAGE_FILENAME: 'apps/web/package.json' | |
- name: 'cat apps/web/package.json' | |
run: cat apps/web/package.json | |
- name: 'Output Step' | |
env: | |
NEW_TAG: ${{ steps.version-bump.outputs.newTag }} | |
run: echo "new tag $NEW_TAG" | |
# - name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: 'arm64,arm' | |
# - name: Docker Setup Buildx | |
# uses: docker/[email protected] | |
# - name: Login to OCIR | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: gru.ocir.io | |
# username: ${{ secrets.OCI_REPOSITORY_USER }} | |
# password: ${{ secrets.OCI_REPOSITORY_PASS }} | |
# - name: Build Docker image | |
# run: | | |
# docker buildx build . --platform linux/arm64 -t "gru.ocir.io/gricbxnlp2kb/trampar-de-casa:latest" -t "gru.ocir.io/gricbxnlp2kb/trampar-de-casa:$(cd apps/web && cat package.json | jq -r '.version')" --push \ | |
# --build-arg DATABASE_URL="${{ secrets.DATABASE_URL }}" \ | |
# --build-arg SUPABASE_URL="${{ secrets.SUPABASE_URL }}" \ | |
# --build-arg SUPABASE_SERVICE_ROLE="${{ secrets.SUPABASE_SERVICE_ROLE }}" \ | |
# --build-arg EMAIL_KEY="${{ secrets.EMAIL_KEY }}" \ | |
# --build-arg EMAIL_PASS="${{ secrets.EMAIL_PASS }}" \ | |
# --build-arg CRYPT_SECRET="${{ secrets.CRYPT_SECRET }}" \ | |
# --build-arg RESEND_KEY="${{ secrets.RESEND_KEY }}" \ | |
# --build-arg RESEND_WEBHOOK_SECRET="${{ secrets.RESEND_WEBHOOK_SECRET }}" \ | |
# --build-arg OWNER_EMAIL="${{ secrets.OWNER_EMAIL }}" \ | |
# --build-arg NEXT_PUBLIC_MIXPANEL_KEY="${{ secrets.NEXT_PUBLIC_MIXPANEL_KEY }}" \ | |
# --build-arg CRON_SECRET="${{ secrets.CRON_SECRET }}" |