File tree Expand file tree Collapse file tree 2 files changed +48
-33
lines changed Expand file tree Collapse file tree 2 files changed +48
-33
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Build and Push to Docker Hub
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+ workflow_dispatch :
8+ inputs :
9+ imageTag :
10+ description : Base Image Tag (before the :)
11+ type : string
12+ required : false
13+ default : rancher/istio-installer
14+
15+ jobs :
16+ build-and-push :
17+ permissions :
18+ id-token : write
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+
23+ - name : Set up QEMU
24+ uses : docker/setup-qemu-action@v3
25+
26+ - name : Set up Docker Buildx
27+ uses : docker/setup-buildx-action@v3
28+
29+ - name : Get dockerhub username and password from vault
30+ if : ${{ github.repository == 'rancher/istio-installer' }}
31+ uses : rancher-eio/read-vault-secrets@main
32+ with :
33+ secrets : |
34+ secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials username | DOCKER_USERNAME ;
35+ secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials password | DOCKER_PASSWORD
36+
37+ - name : Log into Docker Hub
38+ uses : docker/login-action@v3
39+ with :
40+ username : ${{ env.DOCKER_USERNAME || secrets.DOCKER_USERNAME }}
41+ password : ${{ env.DOCKER_PASSWORD || secrets.DOCKER_PASSWORD }}
42+
43+ - name : Build and push
44+ uses : docker/build-push-action@v5
45+ with :
46+ platforms : linux/amd64,linux/arm64
47+ push : true
48+ tags : ${{ inputs.imageTag }}:${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments