retry #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 | |
on: | |
push: | |
branches: | |
- "feat/78" | |
- "master" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
docker: | |
runs-on: ubicloud | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
timeout-minutes: 45 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Build image | |
run: | | |
VERSION_TAG=$(grep -Po -m1 '\d.\d.\d' Cargo.toml) | |
docker build -f test.Dockerfile .\ | |
-t "${REGISTRY}/${IMAGE_NAME}:test-${GITHUB_SHA::6}"\ | |
-t "${REGISTRY}/${IMAGE_NAME}:test-${VERSION_TAG}"\ | |
-t "${REGISTRY}/${IMAGE_NAME}:latest" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish image | |
run: | | |
docker login ${REGISTRY} -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} | |
docker image push --all-tags "${REGISTRY}/${IMAGE_NAME}" | |
env: | |
DOCKER_USERNAME: ${{ github.actor }} | |
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |