Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircleCI から GitHub Action へ #1

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .circleci/config.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/test-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test Build Push

on: push

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
ghc-version: '8.8.1'
- run: cabal update
- run: cabal test
build-push:
runs-on: ubuntu-latest
needs: test
steps:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Login to the Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# 距離計算

[![CircleCI](https://circleci.com/gh/odt/distance.svg?style=svg)](https://circleci.com/gh/odt/distance)

始点の緯度経度、終点の緯度経度が並んだ CSV があります。

``` csv
Expand All @@ -20,4 +18,4 @@

標準入力から読み込んで標準出力に書き出します。

[GitHub Package Registry](https://github.com/odt/distance/packages) に Docker イメージがあります
Docker イメージが GitHub Packages に置かれている