Skip to content

Automatically add next versions #130

Automatically add next versions

Automatically add next versions #130

name: INTEGRATION CD DISTRIBUTION API
concurrency:
group: integration-${{ github.ref }}
on:
pull_request:
types: [opened,reopened,synchronize,labeled]
jobs:
distribution_api_integration:
name: Distribution API Integration
runs-on: ubuntu-latest
timeout-minutes: 15
if: contains(github.event.pull_request.labels.*.name, 'integration-deployment')
steps:
- name: Checkout the repository 🎁
uses: actions/checkout@v2
- name: 'Authenticating to GCP ⚙️'
uses: google-github-actions/auth@v1
with:
project_id: core-oss-integration
credentials_json: ${{ secrets.G_CREDENTIALS_INTEGRATION }}
- name: 'Setting up Cloud SDK 💳'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Configure gcloud 👷
run: gcloud auth configure-docker europe-west1-docker.pkg.dev
- name: Get tag
shell: bash
id: get_tag
run: echo "TAG=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
- name: Build and publish Dockerfile 📦
run: |
docker build -f cloud.Dockerfile \
--tag="europe-west1-docker.pkg.dev/core-oss-integration/distribution-api/distribution-api:latest" \
--tag="europe-west1-docker.pkg.dev/core-oss-integration/distribution-api/distribution-api:${{ steps.get_tag.outputs.TAG }}" .
docker push europe-west1-docker.pkg.dev/core-oss-integration/distribution-api/distribution-api:latest
docker push europe-west1-docker.pkg.dev/core-oss-integration/distribution-api/distribution-api:${{ steps.get_tag.outputs.TAG }}
- name: Trigger deploy 🚀
uses: aurelien-baudet/workflow-dispatch@v2
with:
workflow: deployment-integration.yml
repo: PrestaShopCorp/terraform-core-oss-distribution-api
token: ${{ secrets.ACCESS_TOKEN }}
ref: 'refs/heads/main'
inputs: '{ "version": "${{ steps.get_tag.outputs.TAG }}" }'