Update actions #3
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: publish | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
dockerhub: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get version | |
uses: actions/github-script@v6 | |
id: version | |
with: | |
result-encoding: string | |
script: return context.ref.split('/')[2].substring(1) | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Setup cache | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to Container Registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push ourtownrentals/ci:${{ steps.version.outputs.result }} | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ourtownrentals/ci:${{ steps.version.outputs.result }} |