Skip to content

Commit d3ccf8f

Browse files
Merge pull request #77 from adamkpickering/migrate-rancher-istio-installer-from-drone-to-gh-actions
Add `release.yaml` workflow
2 parents ecb2ee8 + dce76fe commit d3ccf8f

File tree

2 files changed

+48
-33
lines changed

2 files changed

+48
-33
lines changed

.drone.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 }}

0 commit comments

Comments
 (0)