Skip to content

ci: bump version to 1.1.0 #26

ci: bump version to 1.1.0

ci: bump version to 1.1.0 #26

Workflow file for this run

name: Publish Docker image
on:
push:
branches:
- master
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract version from shard.yml
id: extract_version
run: |
VERSION=$(grep -oP 'version:\s*\K\S+' shard.yml)
VERSION=$(echo $VERSION | tr -d '\n\r')
echo "RELEASE_TAG=$VERSION" >> $GITHUB_ENV
- name: Build and push image
id: push
uses: docker/[email protected]
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
sjdonado/bit:latest
${{ github.event_name == 'release' && env.RELEASE_TAG && 'sjdonado/bit:${{ env.RELEASE_TAG }}' || '' }}
- name: Attest
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: sjdonado/bit
subject-digest: ${{ steps.push.outputs.digest }}