Skip to content

Commit

Permalink
Merge pull request #9 from grafana-operator/setup-ci
Browse files Browse the repository at this point in the history
feat: release ci for the plugin init container
  • Loading branch information
Edvin N authored Oct 25, 2021
2 parents 8dda91c + 90ed242 commit b5e1c3e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release grafana_plugins_init

on:
push:
tags:
- '*'

jobs:
container-images:
name: Build and push container images
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: quay.io
DOCKER_REPOSITORY: grafana-operator/grafana_plugins_init
DOCKER_PLATFORMS: linux/amd64,linux/arm64,linux/s390x
steps:
- name: Clone repo and checkout submodules
uses: actions/[email protected]
with:
submodules: recursive
- name: Prepare
id: prep
run: |
VERSION=sha-${GITHUB_SHA::8}
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF/refs\/tags\//}
fi
echo ::set-output name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=VERSION::${VERSION}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log in to quay.io
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push multi-arch Docker image
uses: docker/build-push-action@v2
with:
platforms: ${{ env.DOCKER_PLATFORMS }}
push: true
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }}:${{ steps.prep.outputs.VERSION }}

0 comments on commit b5e1c3e

Please sign in to comment.