v0.2.2 #14
Workflow file for this run
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: 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/parse-tool-versions@v1.0 | |
- 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 }} |