Skip to content

fix(github-action): update renovatebot/github-action ( v40.2.4 → v40.… #12

fix(github-action): update renovatebot/github-action ( v40.2.4 → v40.…

fix(github-action): update renovatebot/github-action ( v40.2.4 → v40.… #12

Workflow file for this run

---
name: "Release: rust-arch"
on:
workflow_dispatch:
# inputs:
# version:
# description: Version to build
# default: "latest"
# required: true
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: Build rust-arch
runs-on: ubuntu-latest
steps:
- name: Setup Tools
shell: bash
run: |
sudo apt-get -qq update && \
sudo apt-get -qq install --no-install-recommends -y curl unzip gcc g++ git
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 1
- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
- name: Setup workflow Variables
id: vars
shell: bash
run: |-
VERSION="latest"
if test "$GITHUB_EVENT_NAME" == "workflow_dispatch"; then
VERSION=$(cat VERSION)
fi
echo "::set-output name=version::$VERSION"
echo "::set-output name=tag_version::rust-arch:$VERSION"
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Build container image
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 # v6
with:
build-args: |-
VERSION=${{ steps.vars.outputs.version }}
context: .
platforms: linux/amd64 # load does not support muti-arch https://github.com/docker/buildx/issues/290
file: Dockerfile
push: true
tags: |-
ghcr.io/${{ github.repository_owner }}/${{ steps.vars.outputs.tag_version }}
cache-from: type=gha
cache-to: type=gha,mode=max