Skip to content

Commit

Permalink
🐛 wip fix release disable image build and pr
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhir committed Sep 2, 2024
1 parent 34d419e commit 3e9e2dc
Showing 1 changed file with 67 additions and 67 deletions.
134 changes: 67 additions & 67 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,71 +62,71 @@ jobs:
name: target
path: "**/target"
retention-days: 5
- name: Push changes to new branch
if: ${{ inputs.snapshot-release == false }}
run: |
git checkout -b ${{ github.ref_name }}-version-bump
git push --force origin ${{ github.ref_name }}-version-bump
- name: Create pull request
if: ${{ inputs.snapshot-release == false }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { repo, owner } = context.repo;
const pullResult = await github.rest.pulls.create({
title: 'chore: bump release version ${{ github.ref_name }}',
owner,
repo,
head: '${{ github.ref_name }}-version-bump',
base: '${{ github.ref_name }}',
body: [
'This PR is auto-generated'
].join('\n')
});
await github.rest.issues.addAssignees({
owner,
repo,
issue_number: pullResult.data.number,
assignees: ['${{ github.actor }}'],
});
console.log(`Pull Request created: ${pullResult.data.html_url}`);
# - name: Push changes to new branch
# if: ${{ inputs.snapshot-release == false }}
# run: |
# git checkout -b ${{ github.ref_name }}-version-bump
# git push --force origin ${{ github.ref_name }}-version-bump
# - name: Create pull request
# if: ${{ inputs.snapshot-release == false }}
# uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
# with:
# script: |
# const { repo, owner } = context.repo;
# const pullResult = await github.rest.pulls.create({
# title: 'chore: bump release version ${{ github.ref_name }}',
# owner,
# repo,
# head: '${{ github.ref_name }}-version-bump',
# base: '${{ github.ref_name }}',
# body: [
# 'This PR is auto-generated'
# ].join('\n')
# });
# await github.rest.issues.addAssignees({
# owner,
# repo,
# issue_number: pullResult.data.number,
# assignees: ['${{ github.actor }}'],
# });
# console.log(`Pull Request created: ${pullResult.data.html_url}`);

build-images:
if: inputs.build-images == true
needs: build-maven
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: refarch-gateway
path: ./refarch-gateway
- name: s3-integration-rest-service
path: ./refarch-integrations/refarch-s3-integration/refarch-s3-integration-rest/refarch-s3-integration-rest-service
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Download target artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: target
- name: Login to Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for image
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: "${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.name }}"
tags: |
type=raw,value=${{ inputs.release-version }}
type=raw,value=latest,enable=${{ inputs.snapshot-release == false }}
- name: Build and push image
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: ${{ matrix.path }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# build-images:
# if: inputs.build-images == true
# needs: build-maven
# runs-on: ubuntu-latest
# strategy:
# matrix:
# include:
# - name: refarch-gateway
# path: ./refarch-gateway
# - name: s3-integration-rest-service
# path: ./refarch-integrations/refarch-s3-integration/refarch-s3-integration-rest/refarch-s3-integration-rest-service
# steps:
# - name: Checkout code
# uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# - name: Download target artifacts
# uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
# with:
# name: target
# - name: Login to Registry
# uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Extract metadata (tags, labels) for image
# id: meta
# uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
# with:
# images: "${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.name }}"
# tags: |
# type=raw,value=${{ inputs.release-version }}
# type=raw,value=latest,enable=${{ inputs.snapshot-release == false }}
# - name: Build and push image
# uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
# with:
# context: ${{ matrix.path }}
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 3e9e2dc

Please sign in to comment.