Skip to content

Bump docker/login-action from 1 to 3 #62

Bump docker/login-action from 1 to 3

Bump docker/login-action from 1 to 3 #62

Workflow file for this run

---
name: CI/CD
on:
pull_request:
push:
branches:
- main
tags:
- 'v*'
schedule:
- cron: "0 0 * * 0"
jobs:
cicd:
name: CI/CD
runs-on: ubuntu-latest
steps:
- name: Checkout the repo at current context
uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run static code tests
run: |
task test:static
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: bcbrookman/buoy
tags: |
type=raw, value=latest
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
load: true
tags: buoy:test
- name: Run and test that the image works
run: |
docker run --name buoy -d buoy:test
docker exec --tty buoy flask --version
- name: Login to DockerHub
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image to DockerHub
uses: docker/build-push-action@v6
if: github.event_name != 'pull_request'
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}