erpでgqlgenコマンドを使うようにしたので追加 #103
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: Docker | |
on: | |
push: | |
branches: | |
- main | |
# Run tests for any PRs. | |
pull_request: | |
env: | |
IMAGE_ID: ghcr.io/${{ github.repository_owner }}/cloudrun-go | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [20231109, 20231116] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run test | |
run: docker build . --file ${{ matrix.version }}/Dockerfile --tag $IMAGE_ID:${{ matrix.version }} | |
push: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
strategy: | |
matrix: | |
version: [20231109, 20231116] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build image | |
run: | | |
docker build . --file ${{ matrix.version }}/Dockerfile --tag $IMAGE_ID:${{ matrix.version }} | |
- name: Log into GitHub Container Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Push image to GitHub Container Registry | |
run: | | |
echo Version=${{ matrix.version }} | |
docker push $IMAGE_ID:${{ matrix.version }} |