Merge pull request #50 from SumoLogic/drosiek-vagrant #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dev builds | |
on: | |
push: | |
branches: | |
- main | |
- 'release-v[0-9]+' | |
- 'release-v[0-9]+.[0-9]+' | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set up Buildx | |
id: buildx | |
uses: docker/[email protected] | |
- name: Show Buildx platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- name: Extract tag | |
id: extract_tag | |
run: echo "::set-output name=tag::$(echo $(git describe --tags --always))" | |
- name: Print Tag | |
run: echo "Running dev build for ${{ steps.extract_tag.outputs.tag }}" | |
- name: Login to ECR | |
run: make login-ecr | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: USERNAME | |
password: ${{ secrets.CR_PAT }} | |
- name: Build and push docker image | |
run: make publish-docker-ghcr BUILD_TAG=${{ steps.extract_tag.outputs.tag }} |