-
Notifications
You must be signed in to change notification settings - Fork 12
41 lines (33 loc) · 1.36 KB
/
docker-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish Armory Spinnaker Container
on:
push:
- master
jobs:
main:
env:
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install regctl
uses: iarekylew00t/regctl-installer@v1
with:
regctl-release: v0.5.3
- name: Login to Artifactory
run: |
docker login -u ${{ secrets.ARTIFACTORY_USER }} -p ${{ secrets.ARTIFACTORY_PASSWORD }} "$ARTIFACTORY_URL"
- name: Publish The Version Docker Image
id: publish_image
run: |
ARMORY_TOOLS_VERSION="$(python3 -c 'import sys; print(sys.argv[1].split("/")[2])' $GITHUB_REF)-$GITHUB_SHA"
ARMORY_IMAGE_NAME="$ARTIFACTORY_URL/armory-io/docker-debugging-tools:$ARMORY_TOOLS_VERSION"
docker buildx build --push --platform linux/arm64,linux/amd64 -t "$ARMORY_IMAGE_NAME" ./docker-debugging-tools/
echo "version_image=$ARMORY_IMAGE_NAME" >> $GITHUB_OUTPUT
- name: Re-Tagging Docker Image Version
run: |
regctl image copy ${{ steps.publish_image.outputs.version_image }} ${{ env.ARTIFACTORY_URL }}/armory-io/docker-debugging-tools:latest