Skip to content

feat(module): Add pacman #761

feat(module): Add pacman

feat(module): Add pacman #761

Workflow file for this run

name: release images
on:
push:
branches:
- master
tags:
- v*
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
id: toolchain
uses: dtolnay/rust-toolchain@stable
- run: rustup override set ${{steps.toolchain.outputs.name}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: |
make images
make test-images
push:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
id: toolchain
uses: dtolnay/rust-toolchain@stable
- run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Build image
run: make images
- name: Log into registry
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx for multiarch images
uses: docker/setup-buildx-action@v2
- name: Push image
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
IMAGE_VERSION=$VERSION make push-images