Skip to content

Introduce sleep

Introduce sleep #4

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
shared-key: "oura-sync"
key: oura-sync
- name: Build
run: cargo build --release
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: oura-sync
path: ./target/release/oura-sync
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
images: ghcr.io/v3xlabs/oura-sync
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Extract metadata (tags, labels) for Docker (master)
id: meta2
uses: docker/metadata-action@v4
if: startsWith(github.ref, 'refs/heads/master')
with:
images: ghcr.io/v3xlabs/oura-sync
tags: |
type=edge
type=sha
- name: Build Docker Image
uses: docker/build-push-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
# cache-to: type=gha,mode=max
- name: Build Docker Image (master)
uses: docker/build-push-action@v4
if: startsWith(github.ref, 'refs/heads/master')
with:
context: .
push: true
tags: ${{ steps.meta2.outputs.tags }}
labels: ${{ steps.meta2.outputs.labels }}
cache-from: type=gha
# cache-to: type=gha,mode=max
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./target/release/oura-sync