Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update docker build #1880

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/docker-image-ci.yml

This file was deleted.

42 changes: 6 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
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/rps.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(rps): 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/rps:v${nextRelease.version} .",
"publishCmd": "docker push vprodemo.azurecr.io/rps:v${nextRelease.version}"
"prepareCmd": "docker build -t vprodemo.azurecr.io/rps:v${nextRelease.version} . && docker tag vprodemo.azurecr.io/rps:v${nextRelease.version} docker.io/intel/oact-rps:latest && docker tag vprodemo.azurecr.io/rps:v${nextRelease.version} docker.io/intel/oact-rps:v${nextRelease.version}",
"publishCmd": "docker push vprodemo.azurecr.io/rps:v${nextRelease.version} && docker push docker.io/intel/oact-rps:latest && docker push docker.io/intel/oact-rps:v${nextRelease.version}"
}
],
"@semantic-release/git"
Expand Down
Loading