Skip to content

Commit

Permalink
ci: update docker targets for release (#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdmike authored Nov 13, 2024
1 parent c29975d commit 0b6e49b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 77 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/docker-image-ci.yml

This file was deleted.

44 changes: 7 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ jobs:
- run: npm ci
- run: npm run build-ext --if-present
- run: rsync -a package.json README.md ./dist/
- name: Docker Login
- name: Docker Login vprodemo
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: vprodemo.azurecr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
logout: true
- name: Docker Login DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: docker.io
username: ${{ secrets.INTC_DOCKER_USERNAME }}
password: ${{ secrets.INTC_DOCKER_PASSWORD }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@b1b432f13acb7768e0c8efdec416d363a57546f2 # v4.1.1
with:
Expand All @@ -55,39 +61,3 @@ jobs:
@semantic-release/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ROSIE_TOKEN }}

- name: Get Next Version
id: version
run: |
if [ -f .nextVersion ]; then
echo "next=$(cat .nextVersion)" >> "$GITHUB_OUTPUT"
else
echo "next=none" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: ${{ steps.version.outputs.next != 'none' }}
with:
repository: open-amt-cloud-toolkit/e2e-testing
ref: docker-release
clean: true
token: ${{ secrets.ROSIE_TOKEN }}

- name: Create docker-release @ ${{ steps.version.outputs.next }}
if: ${{ steps.version.outputs.next != 'none' }}
env:
RELEASE_YAML: release/mps.yml
NEXT_VERSION: ${{ steps.version.outputs.next }}
run: |
echo "Releasing ${{ github.repository }}@$NEXT_VERSION"
if [ "$NEXT_VERSION" != "" ]; then
CURRENT_VERSION=$(sed -nre 's/(.*):v[0-9]*(([0-9]+\\.)*[0-9]+).*/v\\2/p' $RELEASE_YAML)
sed -i "s/$CURRENT_VERSION/$NEXT_VERSION/g" $RELEASE_YAML
echo "========================="
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git status
git add .
git commit -m "release(mps): automated release of $NEXT_VERSION @ ${GITHUB_SHA::7}"
git push origin docker-release
fi
4 changes: 2 additions & 2 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
[
"@semantic-release/exec",
{
"prepareCmd": "docker build -t vprodemo.azurecr.io/mps:v${nextRelease.version} .",
"publishCmd": "docker push vprodemo.azurecr.io/mps:v${nextRelease.version}"
"prepareCmd": "docker build -t vprodemo.azurecr.io/mps:v${nextRelease.version} . && docker tag vprodemo.azurecr.io/mps:v${nextRelease.version} docker.io/intel/oact-mps:latest && docker tag vprodemo.azurecr.io/mps:v${nextRelease.version} docker.io/intel/oact-mps:v${nextRelease.version}",
"publishCmd": "docker push vprodemo.azurecr.io/mps:v${nextRelease.version} && docker push docker.io/intel/oact-mps:latest && docker push docker.io/intel/oact-mps:v${nextRelease.version}"
}
],
"@semantic-release/git"
Expand Down

0 comments on commit 0b6e49b

Please sign in to comment.