Skip to content

v0.2.1

v0.2.1 #11

Workflow file for this run

name: release new version
on:
workflow_dispatch:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: checkout the source code
uses: actions/checkout@v3
- uses: wistia/[email protected]
- uses: earthly/actions-setup@v1
with: { version: "v${{ env.EARTHLY_TOOL_VERSION }}" }
- name: extract tag and sha
run: |
echo "GIT_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "GIT_REPO_OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
- name: login to registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker image
run: |
earthly \
--push \
+release \
--GIT_TAG=${{ env.GIT_RELEASE_TAG }} \
--GIT_COMMIT=${{ env.GIT_SHA_SHORT }} \
--CI_REGISTRY_IMAGE=ghcr.io/zapier/tfbuddy \
--token ${{ secrets.GITHUB_TOKEN }}