Skip to content

Commit daf7ea5

Browse files
committed
publish to dockerhub
1 parent a82afd4 commit daf7ea5

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/build-and-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,28 @@ jobs:
6565
run: docker build -t traycer/trayce_agent_tmp:${ARCH} .
6666

6767
- name: Push
68+
if: github.ref == 'refs/heads/main'
6869
run: docker push traycer/trayce_agent_tmp:${ARCH}
70+
71+
release:
72+
name: Publish Release
73+
runs-on: ubuntu-latest
74+
if: github.ref == 'refs/heads/main'
75+
needs: [build-linux-amd64, build-linux-arm64]
76+
steps:
77+
- name: Clone repository
78+
uses: actions/checkout@v4
79+
80+
- name: Login to Docker Hub
81+
uses: docker/login-action@v3
82+
with:
83+
username: ${{ secrets.DOCKERHUB_USER }}
84+
password: ${{ secrets.DOCKERHUB_PASS }}
85+
86+
- name: Create and Push Multi-Arch Manifest
87+
run: |
88+
export VERSION=$(cat ./VERSION)
89+
docker manifest create traycer/trayce_agent:${VERSION} traycer/trayce_agent_tmp:amd64 traycer/trayce_agent_tmp:arm64
90+
docker manifest create traycer/trayce_agent:latest traycer/trayce_agent_tmp:amd64 traycer/trayce_agent_tmp:arm64
91+
docker manifest push traycer/trayce_agent:${VERSION}
92+
docker manifest push traycer/trayce_agent:latest

0 commit comments

Comments
 (0)