Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Remove old MTR from CI-Master #255

Merged
merged 2 commits into from
Aug 18, 2022
Merged
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
25 changes: 1 addition & 24 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ jobs:
run: docker build
--tag ghcr.io/${GITHUB_REPOSITORY}/cwa-quick-test-backend:latest
--tag ghcr.io/${GITHUB_REPOSITORY}/cwa-quick-test-backend:${VERSION}
--tag ${TRUSTED_URL}/${TRUSTED_REPOSITORY}/cwa-quick-test-backend:${VERSION}
--tag ${MTR_REPOSITORY}/cwa-quick-test-backend:${VERSION}
--build-arg MAVEN_PASSWORD=${APP_PACKAGES_PASSWORD}
--build-arg MAVEN_USERNAME=${APP_PACKAGES_USERNAME}
.
env:
TRUSTED_URL: ${{ secrets.TRUSTED_URL }}
TRUSTED_REPOSITORY: ${{ secrets.TRUSTED_REPOSITORY }}
APP_PACKAGES_USERNAME: ${{ github.actor }}
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
MTR_REPOSITORY: ${{ secrets.MTR_REPOSITORY }}
Expand All @@ -44,27 +41,7 @@ jobs:
docker push ghcr.io/${GITHUB_REPOSITORY}/cwa-quick-test-backend:${VERSION}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: docker push trusted
run: |
echo ${TRUSTED_TOKEN} | docker login ${TRUSTED_URL} -u ${TRUSTED_USER} --password-stdin
export DOCKER_CONTENT_TRUST=1
export DOCKER_CONTENT_TRUST_SERVER=${TRUSTED_SERVER_URL}
export DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE=${TRUSTED_TOKEN}
export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE=${TRUSTED_TOKEN}
gpg --quiet --batch --yes --decrypt --passphrase=${TRUSTED_KEY} \
--output trusted.key trusted.key.gpg
chmod 600 trusted.key
docker trust key load trusted.key --name user
docker trust sign ${TRUSTED_URL}/${TRUSTED_REPOSITORY}/cwa-quick-test-backend:${VERSION}
docker push ${TRUSTED_URL}/${TRUSTED_REPOSITORY}/cwa-quick-test-backend:${VERSION}
env:
TRUSTED_KEY: ${{ secrets.TRUSTED_KEY }}
TRUSTED_URL: ${{ secrets.TRUSTED_URL }}
TRUSTED_SERVER_URL: ${{ secrets.TRUSTED_SERVER_URL }}
TRUSTED_REPOSITORY: ${{ secrets.TRUSTED_REPOSITORY }}
TRUSTED_USER: ${{ secrets.TRUSTED_USER }}
TRUSTED_TOKEN: ${{ secrets.TRUSTED_TOKEN }}
- name: docker push new mtr
- name: docker push mtr
run: |
echo ${MTR_TOKEN} | docker login ${MTR_REPOSITORY} -u ${MTR_USER} --password-stdin
docker push ${MTR_REPOSITORY}/cwa-quick-test-backend:${VERSION}
Expand Down